Commit 966e3c5b authored by Victor Yacovlev's avatar Victor Yacovlev

DocBook: fixed XML symbols handling

parent c6162813
......@@ -1239,7 +1239,9 @@ QString ContentView::renderText(ModelPtr data) const
}
parent = parent->parent();
}
return isPreformat? data->text() : normalizeText(data->text());
QString result = isPreformat? data->text() : normalizeText(data->text());
result.replace("<", "&lt;").replace(">", "&gt;");
return result;
}
QString ContentView::renderSection(ModelPtr data) const
......
......@@ -500,6 +500,15 @@ bool DocBookFactory::skippedEntity(const QString &name)
else if (name == "larr") {
buffer_.push_back(QChar(0x2190));
}
else if (name.startsWith("#")) {
const QString sCode = name.mid(1);
bool ok = false;
unsigned int code = sCode.toUInt(&ok);
if (ok) {
const QChar symbol(code);
buffer_.push_back(symbol);
}
}
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment