Enhancement of the webui preference and of the quote escape for javascript

This commit is contained in:
racam 2015-04-27 20:44:12 +02:00
parent 80b526d1af
commit d7ac142885
3 changed files with 16 additions and 10 deletions

View file

@ -270,6 +270,10 @@ void AbstractWebApplication::translateDocument(QString& data)
// Remove keyboard shortcuts
translation.replace(mnemonic, "");
// Use HTML code for quotes to prevent issues with JS
translation.replace("'", "'");
translation.replace("\"", """);
data.replace(i, regex.matchedLength(), translation);
i += translation.length();
}