Skip to content

Commit

Permalink
Try to fix regexp redos
Browse files Browse the repository at this point in the history
fixes  #510
  • Loading branch information
esamattis committed Oct 3, 2018
1 parent 2f78f0d commit f486cd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unescapeHTML.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var makeString = require('./helper/makeString');
var htmlEntities = require('./helper/htmlEntities');

module.exports = function unescapeHTML(str) {
return makeString(str).replace(/\&([^;]+);/g, function(entity, entityCode) {
return makeString(str).replace(/\&([^;]{1,10});/g, function(entity, entityCode) {
var match;

if (entityCode in htmlEntities) {
Expand Down

0 comments on commit f486cd6

Please sign in to comment.