mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 14:16:09 -06:00
RichText: EncodeHTML fix
git-svn-id: svn://ultimatepp.org/upp/trunk@15528 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
872d83d5af
commit
adea4df7e8
4 changed files with 20 additions and 19 deletions
|
|
@ -246,8 +246,7 @@ String AsHtml(const RichTxt& text, const RichStyles& styles, Index<String>& css,
|
|||
endtag = "</a>";
|
||||
}
|
||||
String cs;
|
||||
if(part.text[0] != 9)
|
||||
cs = HtmlCharStyle(part.format, p.format);
|
||||
cs = HtmlCharStyle(part.format, p.format);
|
||||
if(!cs.IsEmpty()) {
|
||||
html << "<span" << FormatClass(css, cs) << ">";
|
||||
endtag = "</span>" + endtag;
|
||||
|
|
@ -392,4 +391,20 @@ String AsCss(Index<String>& ss)
|
|||
return css;
|
||||
}
|
||||
|
||||
String MakeHtml(const char *title, const String& css, const String& body)
|
||||
{
|
||||
String h =
|
||||
"<HTML>\r\n"
|
||||
"<HEAD>\t\n"
|
||||
"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\t\n"
|
||||
"<META NAME=\"Generator\" CONTENT=\"U++ HTML Package\">\t\n"
|
||||
"<TITLE>" + String(title) + "</TITLE>\r\n"
|
||||
;
|
||||
if(!IsNull(css))
|
||||
h << "<STYLE TYPE=\"text/css\"><!--\r\n"
|
||||
<< css << "\r\n-->\r\n</STYLE>\r\n";
|
||||
h << "</HEAD><BODY>" << body << "</BODY>";
|
||||
return h;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue