summaryrefslogtreecommitdiffstats
path: root/src/htmldocvisitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/htmldocvisitor.cpp')
-rw-r--r--src/htmldocvisitor.cpp10
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 << "&lt;"; break;
case '>': m_t << "&gt;"; break;
case '&': m_t << "&amp;"; break;
+ case '\\': if ((*p == '(') || (*p == ')'))
+ m_t << "\\&zwj;" << *p++;
+ else
+ m_t << c;
+ break;
default: m_t << c;
}
}
@@ -2247,6 +2252,11 @@ void HtmlDocVisitor::filterQuotedCdataAttr(const char* str)
case '"': m_t << "&quot;"; break;
case '<': m_t << "&lt;"; break;
case '>': m_t << "&gt;"; break;
+ case '\\': if ((*p == '(') || (*p == ')'))
+ m_t << "\\&zwj;" << *p++;
+ else
+ m_t << c;
+ break;
default: m_t << c;
}
}