diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-28 14:32:25 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-28 14:32:25 (GMT) |
commit | 06eb8c6edcb0df79717f9cf3afb4061b57157382 (patch) | |
tree | 934b1969b99c9e8656d16ca811b8104897fb1bba /src/context.cpp | |
parent | e16e8f3c094f073d08a49bb8397bb251c18af3f7 (diff) | |
download | Doxygen-06eb8c6edcb0df79717f9cf3afb4061b57157382.zip Doxygen-06eb8c6edcb0df79717f9cf3afb4061b57157382.tar.gz Doxygen-06eb8c6edcb0df79717f9cf3afb4061b57157382.tar.bz2 |
issue #697: Test 32 reference to bell signal (XHTML, LaTeX)
Diffstat (limited to 'src/context.cpp')
-rw-r--r-- | src/context.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/context.cpp b/src/context.cpp index fc8833d..074e6ec 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -3802,6 +3802,7 @@ class TextGeneratorHtml : public TextGeneratorIntf : m_ts(ts), m_relPath(relPath) {} void writeString(const char *s,bool keepSpaces) const { + static const char *hex="0123456789ABCDEF"; if (s==0) return; if (keepSpaces) { @@ -3817,6 +3818,19 @@ class TextGeneratorHtml : public TextGeneratorIntf case '"': m_ts << """; break; case '&': m_ts << "&"; break; case ' ': m_ts << " "; break; + default: + { + uchar uc = static_cast<uchar>(c); + if (uc<32 && !isspace(c)) // non-printable control characters + { + m_ts << "$" << hex[uc>>4] << hex[uc&0xF] << ";"; + } + else + { + m_ts << c; + } + } + break; } } } |