From 9a408df26eec978c81e07e17aa365fb6d1bc2d7c Mon Sep 17 00:00:00 2001 From: lsv Date: Wed, 8 Oct 2025 11:15:21 +0500 Subject: [PATCH] fix html escape char --- ctl/ctlSQLBox.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ctl/ctlSQLBox.cpp b/ctl/ctlSQLBox.cpp index ec04d98..1de38b7 100644 --- a/ctl/ctlSQLBox.cpp +++ b/ctl/ctlSQLBox.cpp @@ -1799,9 +1799,13 @@ wxString ctlSQLBox::TextToHtml(int start, int end,bool isAddNewLine) { int s = 0; //wxUniChar c = selText[k].GetValue(); if (c == '\r') { startp = startp + l; k++; continue; }; + if (c == '\n') { str += newline; startp = startp + l; k++; continue; }; if (c == 9) s = 5; if (c == 32) s = 1; + if (c == '<') { str+="<"; startp = startp + l; k++; continue; }; + if (c == '>') { str+=">"; startp = startp + l; k++; continue; }; + if (c == '&') { str+="&"; startp = startp + l; k++; continue; }; if (s > 0) for (int tt = 0; tt < s; tt++) str += wxT(" "); else str += c; startp = startp + l; k++;