diff --git a/include/utils/PreviewHtml.h b/include/utils/PreviewHtml.h
index fa14a7d..f95a682 100644
--- a/include/utils/PreviewHtml.h
+++ b/include/utils/PreviewHtml.h
@@ -10,6 +10,8 @@
#define PREVIEW_ENDFIELD 16
#define PREVIEW_ENDROW 32
#define PREVIEW_QUOTE 64
+#define PREVIEW_RAWHTML 128
+
#define CHKFLAG2(val,par) ((val & par)>0)
enum class fmtpreview {
AUTO, AUTOVACCUM,CSV,SIMPLE_TEXT
@@ -61,8 +63,12 @@ private:
bool saveTokenIfNotEmpty(wxString& savestr, int flag) {
if (savestr.Length() > 0) {
wxString tmp = savestr;
- tmp=escapeHtml(tmp,true);
- tmp.Replace(" ", " ");
+ if (CHKFLAG2(flag, PREVIEW_RAWHTML)) {
+ // nothing
+ } else {
+ tmp=escapeHtml(tmp,true);
+ tmp.Replace(" ", " ");
+ }
if (CHKFLAG2(flag, PREVIEW_ENDROW)) tmp = "
";
if (CHKFLAG2(flag, PREVIEW_DIGITS)) {
int l = savestr.Length();
diff --git a/utils/PreviewHtml.cpp b/utils/PreviewHtml.cpp
index d12bf2a..4d32099 100644
--- a/utils/PreviewHtml.cpp
+++ b/utils/PreviewHtml.cpp
@@ -214,7 +214,19 @@ wxString PreviewHtml::Preview(const wxString& txt, fmtpreview type) {
saveTokenIfNotEmpty(currWord, PREVIEW_WORD);
saveTokenIfNotEmpty(currDigits, PREVIEW_DIGITS);
saveTokenIfNotEmpty(currSep, PREVIEW_SEP);
+ if (fmt == fmtpreview::AUTO && txt.Len()<256) {
+ if (txt.IsNumber()) {
+ wxLongLong l = StrToLongLong(txt);
+ wxString newtxt;
+ if ((l>999 || l<-999)) {
+ newtxt="