Trouble printing the '&" character.
I expect that following plugin should print "AB&D" but I get only "AB".
What am I missing regarding the '&" character ?
Thanks
import QtQuick 2.0
import MuseScore 1.0
MuseScore {
version: "2.0"
description: "This plugin adds Native American Flute Fingering Diagrams"
menuPath: "Plugins.Native American Flute"
onRun: {
var cursor = curScore.newCursor();
cursor.rewind(0);
var text = newElement(Element.STAFF_TEXT);
text.text = "";
text.text = text.text + "A";
text.text = text.text + "B";
text.text = text.text + "&";
text.text = text.text + "D";
text.pos.y=9
cursor.add(text);
Qt.quit();
} // end onRun
}
Attachment | Size |
---|---|
bug_test.qml | 637 bytes |
Comments
Text elements are XML-encoded, to display an ampersand, you must use its encoded version:
&