diff options
Diffstat (limited to 'src/htmldocvisitor.cpp')
-rw-r--r-- | src/htmldocvisitor.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index bb35cae..ea2dffb 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -2226,6 +2226,11 @@ void HtmlDocVisitor::filter(const char *str) case '<': m_t << "<"; break; case '>': m_t << ">"; break; case '&': m_t << "&"; break; + case '\\': if ((*p == '(') || (*p == ')')) + m_t << "\\‍" << *p++; + else + m_t << c; + break; default: m_t << c; } } @@ -2247,6 +2252,11 @@ void HtmlDocVisitor::filterQuotedCdataAttr(const char* str) case '"': m_t << """; break; case '<': m_t << "<"; break; case '>': m_t << ">"; break; + case '\\': if ((*p == '(') || (*p == ')')) + m_t << "\\‍" << *p++; + else + m_t << c; + break; default: m_t << c; } } |