Skip to content

Commit

Permalink
Merge pull request #909 from microsoft/remove/html-entities
Browse files Browse the repository at this point in the history
[BotBuilder-AI] Remove 'html-entities' from QnA Maker class
  • Loading branch information
Zerryth authored May 13, 2019
2 parents e31d659 + 0e7a378 commit fc4f59c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
2 changes: 0 additions & 2 deletions libraries/botbuilder-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
"typings": "./lib/index.d.ts",
"dependencies": {
"@microsoft/recognizers-text-date-time": "1.1.2",
"@types/html-entities": "^1.2.16",
"@types/node": "^10.12.18",
"@types/request-promise-native": "^1.0.10",
"@azure/cognitiveservices-luis-runtime": "2.0.0",
"botbuilder-core": "~4.1.6",
"html-entities": "^1.2.1",
"moment": "^2.20.1",
"@azure/ms-rest-js": "~1.8.2",
"request": "^2.87.0",
Expand Down
7 changes: 0 additions & 7 deletions libraries/botbuilder-ai/src/qnaMaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* Licensed under the MIT License.
*/
import { Activity, TurnContext, BotTelemetryClient, NullTelemetryClient } from 'botbuilder-core';
import * as entities from 'html-entities';
import * as os from 'os';
const pjson: any = require('../package.json');
import * as request from 'request-promise-native';
Expand All @@ -17,11 +16,6 @@ const QNAMAKER_TRACE_TYPE = 'https://www.qnamaker.ai/schemas/trace';
const QNAMAKER_TRACE_NAME = 'QnAMaker';
const QNAMAKER_TRACE_LABEL = 'QnAMaker Trace';

/**
* @private
*/
const htmlentities: entities.AllHtmlEntities = new entities.AllHtmlEntities();

/**
* An individual answer returned by a call to the QnA Maker Service.
*/
Expand Down Expand Up @@ -579,7 +573,6 @@ export class QnAMaker implements QnAMakerTelemetryClient {
private formatQnaResult(qnaResult: any): QnAMakerResult[] {
return qnaResult.answers.map((ans: any) => {
ans.score = ans.score / 100;
ans.answer = htmlentities.decode(ans.answer);

if (ans.qnaId) {
ans.id = ans.qnaId;
Expand Down

0 comments on commit fc4f59c

Please sign in to comment.