Fixed populateOption HTML escape bug. Closes #490
parent
7d09ba5669
commit
3d20833d42
|
@ -240,7 +240,7 @@ function regexHighlight (input, regex, displayTotal) {
|
||||||
if (groups.length) {
|
if (groups.length) {
|
||||||
title += "Groups:\n";
|
title += "Groups:\n";
|
||||||
for (let i = 0; i < groups.length; i++) {
|
for (let i = 0; i < groups.length; i++) {
|
||||||
title += `\t${i+1}: ${Utils.escapeHtml(groups[i])}\n`;
|
title += `\t${i+1}: ${Utils.escapeHtml(groups[i] || "")}\n`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* @license Apache-2.0
|
* @license Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import Utils from "../core/Utils";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Object to handle the creation of operation ingredients.
|
* Object to handle the creation of operation ingredients.
|
||||||
*/
|
*/
|
||||||
|
@ -156,7 +158,7 @@ class HTMLIngredient {
|
||||||
} else if ((m = this.value[i].name.match(/\[\/([a-z0-9 -()^]+)\]/i))) {
|
} else if ((m = this.value[i].name.match(/\[\/([a-z0-9 -()^]+)\]/i))) {
|
||||||
html += "</optgroup>";
|
html += "</optgroup>";
|
||||||
} else {
|
} else {
|
||||||
html += `<option populate-value="${this.value[i].value}">${this.value[i].name}</option>`;
|
html += `<option populate-value="${Utils.escapeHtml(this.value[i].value)}">${this.value[i].name}</option>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
html += `</select>
|
html += `</select>
|
||||||
|
|
Loading…
Reference in New Issue