mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
XML escape comment text.
This commit is contained in:
parent
f5234c777a
commit
0d403d8e83
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