Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BotBuilder-AI] Remove 'html-entities' from QnA Maker class #909

Merged
merged 3 commits into from
May 13, 2019

Conversation

gasper-az
Copy link
Contributor

Description

  • Remove html-entities library and its decoding from the answer formatting.

Specific Changes

At this moment when the QnA Maker class in BotBuilder AI receives an answer that contains enconded HTML entities, said entities are decoded before returning the answer.

Remove this behaviour from the QnA Maker answer formatting, as this responsibility should be delegated to the user consuming the answer.

Testing

We did a couple of tests using both the NodeJS and .NET version of the class.
A knowledge base was created with a single answer containing several encoded HTML entities.

image

We tested the answer from the knowledge base by adding it to a console.log() and the sendActivity() using the Echo Browser bot sample.

image
As seen in the image above, the answer returned by the QnA Maker class does not match the answer stored in the knowledge base.

We also compared the behaviour of the JavaScript class against the .NET class replicating the same test.
image

This test confirms that the behaviour of the QnA Maker class in .NET does not decode the HTML entities before returning the answer.

@coveralls
Copy link

coveralls commented May 2, 2019

Pull Request Test Coverage Report for Build #2254

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.06%) to 85.684%

Files with Coverage Reduction New Missed Lines %
libraries/botframework-config/src/botConfigurationBase.ts 2 85.59%
Totals Coverage Status
Change from base Build #2252: -0.06%
Covered Lines: 3255
Relevant Lines: 3663

💛 - Coveralls

@cleemullins
Copy link
Contributor

This looks reasonable to me, as that delegation seems odd.

@Zerryth?

@Zerryth
Copy link
Contributor

Zerryth commented May 13, 2019

Seems good to me

@Zerryth Zerryth merged commit fc4f59c into master May 13, 2019
@Zerryth Zerryth deleted the remove/html-entities branch May 13, 2019 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants