mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Merge pull request #1235 from kchadha/xml-escape-comments
XML escape comment text.
This commit is contained in:
commit
529d271186
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
const uid = require('../util/uid');
|
||||
const Cast = require('../util/cast');
|
||||
const xmlEscape = require('../util/xml-escape');
|
||||
|
||||
class Comment {
|
||||
/**
|
||||
|
@ -31,7 +32,7 @@ class Comment {
|
|||
toXML () {
|
||||
return `<comment id="${this.id}" x="${this.x}" y="${
|
||||
this.y}" w="${this.width}" h="${this.height}" pinned="${
|
||||
this.blockId !== null}" minimized="${this.minimized}">${this.text}</comment>`;
|
||||
this.blockId !== null}" minimized="${this.minimized}">${xmlEscape(this.text)}</comment>`;
|
||||
}
|
||||
|
||||
// TODO choose min and defaults for width and height
|
||||
|
|
Loading…
Reference in a new issue