mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Correcting bug with quote character in workout Textevents and ZWO export (#3872)
Add protection for all XML special characters in workout Textevents and ZWO export
This commit is contained in:
@@ -1520,12 +1520,14 @@ ErgFile::save(QStringList &errors)
|
||||
<< "PowerHigh=\"" <<sections[i].end/CP << "\"";
|
||||
if (Texts.count() > 0) {
|
||||
out << ">\n";
|
||||
foreach (ErgFileText cue, Texts)
|
||||
if (cue.x >= msecs && cue.x <= msecs+sections[i].duration)
|
||||
foreach (ErgFileText cue, Texts) {
|
||||
if (cue.x >= msecs && cue.x <= msecs+sections[i].duration) {
|
||||
out << " <textevent "
|
||||
<< "timeoffset=\""<<(cue.x-msecs)/1000
|
||||
<< "\" message=\"" << cue.text
|
||||
<< "\" message=\"" << Utils::xmlprotect(cue.text)
|
||||
<< "\" duration=\"" << cue.duration << "\"/>\n";
|
||||
}
|
||||
}
|
||||
out << " </" << tag << ">\n";
|
||||
} else {
|
||||
out << "/>\n";
|
||||
|
||||
Reference in New Issue
Block a user