forked from MTSR/mapserver
add some more XSS mitigations
This commit is contained in:
parent
32d131318b
commit
211424930c
@ -1,4 +1,5 @@
|
||||
import AbstractGeoJsonOverlay from './AbstractGeoJsonOverlay.js';
|
||||
import { HtmlSanitizer } from '../../lib/HtmlSanitizer.js';
|
||||
|
||||
export default AbstractGeoJsonOverlay.extend({
|
||||
initialize: function() {
|
||||
@ -80,7 +81,7 @@ export default AbstractGeoJsonOverlay.extend({
|
||||
"properties":{
|
||||
"name": bordername,
|
||||
"color": borderColors[bordername],
|
||||
"popupContent": "<b>Border (" + bordername + ")</b>"
|
||||
"popupContent": "<b>Border (" + HtmlSanitizer.SanitizeHtml(bordername) + ")</b>"
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import AbstractIconOverlay from './AbstractIconOverlay.js';
|
||||
import { HtmlSanitizer } from '../../lib/HtmlSanitizer.js';
|
||||
|
||||
export default AbstractIconOverlay.extend({
|
||||
initialize: function() {
|
||||
@ -27,7 +28,7 @@ export default AbstractIconOverlay.extend({
|
||||
fill='${lbl.attributes.color}'
|
||||
dominant-baseline="central"
|
||||
transform="rotate(${lbl.attributes.direction}, 100, 100)">
|
||||
${lbl.attributes.text}
|
||||
${HtmlSanitizer.SanitizeHtml(lbl.attributes.text)}
|
||||
</text>
|
||||
</svg>
|
||||
`;
|
||||
|
Loading…
Reference in New Issue
Block a user