From f064ff6b3d582f1aab77c1e8a75ad001a745b5be Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Mon, 22 Sep 2014 23:54:24 +0000 Subject: [PATCH] added: htmltextstream escapes more characters now: added characters: " -> &#quot; ' -> ' (' but IE8 has a problem with ') 10 -> 13 -> added: two ezc filters: fil_html_quote " -> &#quot; ' -> ' (' but IE8 has a problem with ') fil_html_newline 10 -> 13 -> changed: fun_subject.html uses
now git-svn-id: svn://ttmath.org/publicrep/winix/trunk@959 e52654a7-88a9-db11-a3e9-0013d4bc506e --- html/fun_subject.html | 10 ++++----- locale/en | 2 +- locale/pl | 2 +- templates/filters.cpp | 41 ++++++++++++++++++++++++++++++++++++ templates/htmltextstream.cpp | 12 +++++++++++ templates/htmltextstream.h | 4 ++++ templates/templates.cpp | 2 ++ templates/templates.h | 2 ++ 8 files changed, 68 insertions(+), 7 deletions(-) diff --git a/html/fun_subject.html b/html/fun_subject.html index 030577b..375349b 100755 --- a/html/fun_subject.html +++ b/html/fun_subject.html @@ -4,18 +4,18 @@
-
- {subject_form_legend} -

{title}

- +
+ + +
[if winix_function_param_is "postredirect"] [end] -
+
diff --git a/locale/en b/locale/en index 070a94b..43f30e7 100755 --- a/locale/en +++ b/locale/en @@ -446,7 +446,7 @@ stat_template_from_mount_point = from the mount point subject_header = Edit subject -subject_form_legend = Edit subject form + uname_header = Uname diff --git a/locale/pl b/locale/pl index 1b861d8..064670a 100755 --- a/locale/pl +++ b/locale/pl @@ -465,7 +465,7 @@ stat_template_from_mount_point = z punktu montowania subject_header = Zmień tytuł -subject_form_legend = Formularz zmiany tytułu + uname_header = Nazwa systemu uname_available_plugins = Dostępne pluginy diff --git a/templates/filters.cpp b/templates/filters.cpp index 13c5a1e..d9579c5 100755 --- a/templates/filters.cpp +++ b/templates/filters.cpp @@ -154,6 +154,47 @@ void fil_new_line_to_br(Info & i) +/* + * " -> &#quot; + * ' -> ' (' but IE8 has a problem with ') + */ +void fil_html_quote(Info & i) +{ + const std::wstring & str = i.in.Str(); + + for(size_t a=0 ; a + * 13 -> + */ +void fil_html_newline(Info & i) +{ + const std::wstring & str = i.in.Str(); + + for(size_t a=0 ; a < > -> > & ->   + " -> " + ' -> ' (it is "'" but IE8 has a problem with ') + 10 -> + 13 -> */ class HtmlTextStream : public TextStream { diff --git a/templates/templates.cpp b/templates/templates.cpp index 5aba314..69cca1d 100755 --- a/templates/templates.cpp +++ b/templates/templates.cpp @@ -279,6 +279,8 @@ void Templates::CreateFunctions() ezc_functions.Insert("fil_first_wordup", fil_first_wordup); ezc_functions.Insert("fil_csv_escape", fil_csv_escape); ezc_functions.Insert("fil_new_line_to_br", fil_new_line_to_br); + ezc_functions.Insert("fil_html_quote", fil_html_quote); + ezc_functions.Insert("fil_html_newline", fil_html_newline); /* diff --git a/templates/templates.h b/templates/templates.h index 598b337..6d0726d 100755 --- a/templates/templates.h +++ b/templates/templates.h @@ -191,6 +191,8 @@ namespace TemplatesFunctions void fil_first_wordup(Info & i); void fil_csv_escape(Info & i); void fil_new_line_to_br(Info & i); + void fil_html_quote(Info & i); + void fil_html_newline(Info & i); /*