mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00
export: escape '#' in data URI body as "%23"
This commit is contained in:
parent
4df0d03baa
commit
62f4471b46
@ -957,6 +957,10 @@ QString VWebUtils::dataURI(const QUrl &p_url, bool p_keepTitle) const
|
|||||||
uri = QString("data:image/svg+xml;utf8,%1").arg(QString::fromUtf8(data));
|
uri = QString("data:image/svg+xml;utf8,%1").arg(QString::fromUtf8(data));
|
||||||
uri.replace('\r', "").replace('\n', "");
|
uri.replace('\r', "").replace('\n', "");
|
||||||
|
|
||||||
|
// Using unescaped '#' characters in a data URI body is deprecated and
|
||||||
|
// will be removed in M68, around July 2018. Please use '%23' instead.
|
||||||
|
uri.replace("#", "%23");
|
||||||
|
|
||||||
if (!p_keepTitle) {
|
if (!p_keepTitle) {
|
||||||
// Remove <title>...</title>.
|
// Remove <title>...</title>.
|
||||||
QRegExp reg("<title>.*</title>", Qt::CaseInsensitive);
|
QRegExp reg("<title>.*</title>", Qt::CaseInsensitive);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user