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 <div class="winix_input_a"> now git-svn-id: svn://ttmath.org/publicrep/winix/trunk@959 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
bfa5d8cc05
commit
f064ff6b3d
|
@ -4,18 +4,18 @@
|
||||||
|
|
||||||
|
|
||||||
<form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]subject">
|
<form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]subject">
|
||||||
<fieldset>
|
|
||||||
<legend>{subject_form_legend}</legend>
|
|
||||||
|
|
||||||
<p class="withnext" style="text-indent: 0;">{title}</p>
|
<div class="winix_input_a">
|
||||||
<input class="edit" type="text" name="subject" value="[if-one item_is][item_subject][else][dir_last_subject][end]">
|
<label>{title}</label>
|
||||||
|
<input type="text" name="subject" value="[if-one item_is][item_subject][else][dir_last_subject][end]">
|
||||||
|
</div>
|
||||||
|
|
||||||
[if winix_function_param_is "postredirect"]
|
[if winix_function_param_is "postredirect"]
|
||||||
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
|
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
|
||||||
[end]
|
[end]
|
||||||
|
|
||||||
<input class="submit" type="submit" value="{change}">
|
<input class="submit" type="submit" value="{change}">
|
||||||
</fieldset>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -446,7 +446,7 @@ stat_template_from_mount_point = from the mount point
|
||||||
|
|
||||||
|
|
||||||
subject_header = Edit subject
|
subject_header = Edit subject
|
||||||
subject_form_legend = Edit subject form
|
|
||||||
|
|
||||||
|
|
||||||
uname_header = Uname
|
uname_header = Uname
|
||||||
|
|
|
@ -465,7 +465,7 @@ stat_template_from_mount_point = z punktu montowania
|
||||||
|
|
||||||
|
|
||||||
subject_header = Zmień tytuł
|
subject_header = Zmień tytuł
|
||||||
subject_form_legend = Formularz zmiany tytułu
|
|
||||||
|
|
||||||
uname_header = Nazwa systemu
|
uname_header = Nazwa systemu
|
||||||
uname_available_plugins = Dostępne pluginy
|
uname_available_plugins = Dostępne pluginy
|
||||||
|
|
|
@ -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<str.size() ; ++a)
|
||||||
|
{
|
||||||
|
if( str[a] == '\"' )
|
||||||
|
i.out << R(""");
|
||||||
|
else
|
||||||
|
if( str[a] == '\'' )
|
||||||
|
i.out << R("'");
|
||||||
|
else
|
||||||
|
i.out << R(str[a]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 10 ->
|
||||||
|
* 13 ->
|
||||||
|
*/
|
||||||
|
void fil_html_newline(Info & i)
|
||||||
|
{
|
||||||
|
const std::wstring & str = i.in.Str();
|
||||||
|
|
||||||
|
for(size_t a=0 ; a<str.size() ; ++a)
|
||||||
|
{
|
||||||
|
if( str[a] == 10 )
|
||||||
|
i.out << R(" ");
|
||||||
|
else
|
||||||
|
if( str[a] == 13 )
|
||||||
|
i.out << R(" ");
|
||||||
|
else
|
||||||
|
i.out << R(str[a]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -248,6 +248,18 @@ HtmlTextStream & HtmlTextStream::ETextPutChar(wchar_t c)
|
||||||
if( c == '&' )
|
if( c == '&' )
|
||||||
buffer += L"&";
|
buffer += L"&";
|
||||||
else
|
else
|
||||||
|
if( c == '\"' )
|
||||||
|
buffer += L""";
|
||||||
|
else
|
||||||
|
if( c == '\'' )
|
||||||
|
buffer += L"'"; // (it is "'" but IE8 has a problem with ')
|
||||||
|
else
|
||||||
|
if( c == 10 )
|
||||||
|
buffer += L" ";
|
||||||
|
else
|
||||||
|
if( c == 13 )
|
||||||
|
buffer += L" ";
|
||||||
|
else
|
||||||
if( c != 0 )
|
if( c != 0 )
|
||||||
buffer += c;
|
buffer += c;
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,10 @@ namespace Winix
|
||||||
< -> <
|
< -> <
|
||||||
> -> >
|
> -> >
|
||||||
& ->
|
& ->
|
||||||
|
" -> "
|
||||||
|
' -> ' (it is "'" but IE8 has a problem with ')
|
||||||
|
10 ->
|
||||||
|
13 ->
|
||||||
*/
|
*/
|
||||||
class HtmlTextStream : public TextStream<std::wstring>
|
class HtmlTextStream : public TextStream<std::wstring>
|
||||||
{
|
{
|
||||||
|
|
|
@ -279,6 +279,8 @@ void Templates::CreateFunctions()
|
||||||
ezc_functions.Insert("fil_first_wordup", fil_first_wordup);
|
ezc_functions.Insert("fil_first_wordup", fil_first_wordup);
|
||||||
ezc_functions.Insert("fil_csv_escape", fil_csv_escape);
|
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_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);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -191,6 +191,8 @@ namespace TemplatesFunctions
|
||||||
void fil_first_wordup(Info & i);
|
void fil_first_wordup(Info & i);
|
||||||
void fil_csv_escape(Info & i);
|
void fil_csv_escape(Info & i);
|
||||||
void fil_new_line_to_br(Info & i);
|
void fil_new_line_to_br(Info & i);
|
||||||
|
void fil_html_quote(Info & i);
|
||||||
|
void fil_html_newline(Info & i);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue