Skip to content

Commit

Permalink
fix #296960: Percent sign cannot be entered into text.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmcclinch committed Nov 13, 2019
1 parent 44a0382 commit 33ff467
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions libmscore/xmlwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ QString XmlWriter::xmlString(ushort c)
return QLatin1String("&");
case '\"':
return QLatin1String(""");
case '%':
return QLatin1String("%");
default:
// ignore invalid characters in xml 1.0
if ((c < 0x20 && c != 0x09 && c != 0x0A && c != 0x0D))
Expand Down
10 changes: 5 additions & 5 deletions mscore/palette/palettetree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ void PaletteCell::write(XmlWriter& xml) const
// using attributes for `custom` and `visible`
// properties instead of nested tags for pre-3.3
// version compatibility
xml.stag(QString("Cell%1%2%3%4")
.arg(!name.isEmpty() ? QString(" name=\"%1\"").arg(XmlWriter::xmlString(name)) : "")
.arg(custom ? " custom=\"1\"" : "")
.arg(!visible ? " visible=\"0\"" : "")
.arg(untranslatedElement ? " trElement=\"1\"" : "")
xml.stag(QString("Cell")
+ (!name.isEmpty() ? " name=\"" + XmlWriter::xmlString(name) + "\"" : "")
+ (custom ? " custom=\"1\"" : "")
+ (!visible ? " visible=\"0\"" : "")
+ (untranslatedElement ? " trElement=\"1\"" : "")
);

if (drawStaff)
Expand Down

0 comments on commit 33ff467

Please sign in to comment.