Skip to content

Commit 07dc74d

Browse files
committed
Filter html tags
1 parent d04709a commit 07dc74d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mathosphere-core/src/main/java/com/formulasearchengine/mathosphere/mlp/contracts/CreateCandidatesMapper.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ private boolean isGood(Word in) {
187187
if (word.length() < 3) {
188188
return false;
189189
}
190+
if (word.contains("<")) {
191+
// remove tags and so
192+
//TODO: Make a white-list of allowed chars.
193+
return false;
194+
}
190195
// we're only interested in nouns, entities and links
191196
return posTag.matches("NN[PS]{0,2}|NP\\+?|NN\\+|LNK");
192197

0 commit comments

Comments
 (0)