summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-05-27 13:32:00 (GMT)
committeralbert-github <albert.tests@gmail.com>2020-05-27 13:32:00 (GMT)
commit4310f3cecb062413728533dba042853872f35790 (patch)
tree29f298e7edc9cef9002098e8e87970f6ce2517e2
parent09aa9ba7da61c9452523f40719cf07bf36e6c976 (diff)
downloadDoxygen-4310f3cecb062413728533dba042853872f35790.zip
Doxygen-4310f3cecb062413728533dba042853872f35790.tar.gz
Doxygen-4310f3cecb062413728533dba042853872f35790.tar.bz2
Issue #7804 String double quotes in C get misinterpreted by pdflatex
The `"` quote is in some LaTeX language packages redefined to be used to create a umlaut / umlaut / tréma and in normal running text they have to replaced / escaped,
-rw-r--r--src/htmlentity.cpp4
-rw-r--r--src/util.cpp1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/htmlentity.cpp b/src/htmlentity.cpp
index 543f86b..ae2d8f1 100644
--- a/src/htmlentity.cpp
+++ b/src/htmlentity.cpp
@@ -263,7 +263,7 @@ static struct htmlEntityInfo
{ SYM(clubs), "\xe2\x99\xa3", "&clubs;", "<clubs/>", "&#9827;", "{$\\clubsuit$}", NULL, "\\u9827?", { NULL, DocSymbol::Perl_unknown }},
{ SYM(hearts), "\xe2\x99\xa5", "&hearts;", "<hearts/>", "&#9829;", "{$\\heartsuit$}", NULL, "\\u9829?", { NULL, DocSymbol::Perl_unknown }},
{ SYM(diams), "\xe2\x99\xa6", "&diams;", "<diams/>", "&#9830;", "{$\\diamondsuit$}", NULL, "\\u9830?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(quot), "\"", "&quot;", "\"", "&quot;", "\"", "\"", "\"", { "\"", DocSymbol::Perl_char }},
+ { SYM(quot), "\"", "&quot;", "\"", "&quot;", "\"{}", "\"", "\"", { "\"", DocSymbol::Perl_char }},
{ SYM(amp), "&", "&amp;", "&amp;", "&amp;", "\\&", "&", "&", { "&", DocSymbol::Perl_char }},
{ SYM(lt), "<", "&lt;", "&lt;", "&lt;", "<", "<", "<", { "<", DocSymbol::Perl_char }},
{ SYM(gt), ">", "&gt;", "&gt;", "&gt;", ">", ">", ">", { ">", DocSymbol::Perl_char }},
@@ -311,7 +311,7 @@ static struct htmlEntityInfo
{ SYM(DoubleColon), "::", "::", "::", "::", "::", "::", "::", { "::", DocSymbol::Perl_string }},
{ SYM(Percent), "%", "%", "%", "%", "\\%", "%", "%", { "%", DocSymbol::Perl_char }},
{ SYM(Pipe), "|", "|", "|", "|", "$|$", "|", "|", { "|", DocSymbol::Perl_char }},
- { SYM(Quot), "\"", "\"", "\"", "&quot;", "\"", "\"", "\"", { "\"", DocSymbol::Perl_char }},
+ { SYM(Quot), "\"", "\"", "\"", "&quot;", "\"{}", "\"", "\"", { "\"", DocSymbol::Perl_char }},
{ SYM(Minus), "-", "-", "-", "-", "-\\/", "-", "-", { "-", DocSymbol::Perl_char }},
{ SYM(Plus), "+", "+", "+", "+", "+", "+", "+", { "+", DocSymbol::Perl_char }},
{ SYM(Dot), ".", ".", ".", ".", ".", ".", ".", { ".", DocSymbol::Perl_char }},
diff --git a/src/util.cpp b/src/util.cpp
index 5b799c8..d198a5d 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6199,6 +6199,7 @@ void filterLatexString(FTextStream &t,const char *str,
case '%': t << "\\%"; break;
case '#': t << "\\#"; break;
case '$': t << "\\$"; break;
+ case '"': t << "\"{}"; break;
case '-': t << "-\\/"; break;
case '^': (usedTableLevels()>0) ? t << "\\string^" : t << (char)c; break;
case '~': t << "\\string~"; break;