mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
fix: qt warning when parsing unknown color attribute
related to goldendict/goldendict#1578
This commit is contained in:
parent
d969b63c1e
commit
2263dfc8da
|
@ -390,7 +390,7 @@ div.xdxf
|
|||
display:inline;
|
||||
}
|
||||
|
||||
.dsl_article font[color=c_default_color]
|
||||
.dsl_article .c_default_color
|
||||
{
|
||||
color: green;
|
||||
}
|
||||
|
|
|
@ -396,7 +396,7 @@ div.xdxf
|
|||
display:inline;
|
||||
}
|
||||
|
||||
.dsl_article font[color=c_default_color]
|
||||
.dsl_article .c_default_color
|
||||
{
|
||||
color: green;
|
||||
}
|
||||
|
|
14
dsl.cc
14
dsl.cc
|
@ -809,9 +809,17 @@ string DslDictionary::nodeToHtml( ArticleDom::Node const & node )
|
|||
}
|
||||
else if( node.tagName == U"c" )
|
||||
{
|
||||
result += "<font color=\"" + ( node.tagAttrs.size() ?
|
||||
Html::escape( Utf8::encode( node.tagAttrs ) ) : string( "c_default_color" ) )
|
||||
+ "\">" + processNodeChildren( node ) + "</font>";
|
||||
if( node.tagAttrs.empty() )
|
||||
{
|
||||
result += "<span class=\"c_default_color\">"
|
||||
+ processNodeChildren( node ) + "</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "<font color=\""
|
||||
+ Html::escape( Utf8::encode( node.tagAttrs ) ) + "\">"
|
||||
+ processNodeChildren( node ) + "</font>";
|
||||
}
|
||||
}
|
||||
else if( node.tagName == U"*" )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue