Summary: | When an action tag includes quotes ("), they get incorrectly escaped when applying action | ||
---|---|---|---|
Product: | [Unmaintained] quanta | Reporter: | MM <radar> |
Component: | general | Assignee: | András Manţia <amantia> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.5 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
MM
2005-12-20 08:41:18 UTC
SVN commit 490343 by amantia: Better handling of quotation marks when editing tags inside a script area. BUG: 118693 M +1 -1 ChangeLog M +13 -1 src/document.cpp --- branches/KDE/3.5/kdewebdev/quanta/ChangeLog #490342:490343 @@ -2,7 +2,7 @@ Version 3.5.1 (Release date: 29-11-2005; Started 04-03-2004): - bugfixes: - - better handling of quotation marks when editing tags inside a script area + - better handling of quotation marks when editing tags inside a script area [#118693] - don't show the file changed dialog after using save as and save again - crash fixes in VPL [#118686] --- branches/KDE/3.5/kdewebdev/quanta/src/document.cpp #490342:490343 @@ -448,8 +448,20 @@ if (s[i] == '"' && (i == 0 || s[i-1] != '\\')) insideQuotes = !insideQuotes; } - if (insideQuotes) + int eLine, eCol; + n->tag->endPos(eLine, eCol); + s = this->text(line + 1, col, eLine, eCol); + bool closeQuotationFound = false; + for (int i = 0 ; i < (int)s.length() - 1; i++) { + if (s[i] == '"' && (i == 0 || s[i-1] != '\\')) + { + closeQuotationFound = true; + break; + } + } + if (insideQuotes && closeQuotationFound) + { text.replace("\\\"", "\""); text.replace("\"", "\\\""); } |