Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Update
messagelib.7102
fix-charset-when-exporting-as-html.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-charset-when-exporting-as-html.patch of Package messagelib.7102
From 8f9f8d69d7ed3fa70e6af4ddd445daaf644c007a Mon Sep 17 00:00:00 2001 From: Wolfgang Bauer <wbauer@tmo.at> Date: Wed, 9 Aug 2017 08:14:01 +0200 Subject: Fix specifying the charset when exporting as HTML The QString::replace() had no effect because the stream actually contains <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">, not just <!DOCTYPE html>. Also, the <meta> tag should be inside the <head> section. BUG: 374260 FIXED-IN: 17.08.0 Differential Revision: https://phabricator.kde.org/D7206 --- webengineviewer/src/webengineexporthtmlpagejob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webengineviewer/src/webengineexporthtmlpagejob.cpp b/webengineviewer/src/webengineexporthtmlpagejob.cpp index 6001fc8..7690319 100644 --- a/webengineviewer/src/webengineexporthtmlpagejob.cpp +++ b/webengineviewer/src/webengineexporthtmlpagejob.cpp @@ -73,7 +73,7 @@ void WebEngineExportHtmlPageJob::slotSaveHtmlToPage(const QString &text) QTextStream stream(&temporaryFile); stream.setCodec("UTF-8"); QString newText = text; - newText.replace(QStringLiteral("<!DOCTYPE html>"), QStringLiteral("<!DOCTYPE html><meta charset=\"UTF-8\">")); + newText.replace(QStringLiteral("<head>"), QStringLiteral("<head><meta charset=\"UTF-8\">")); stream << newText; temporaryFile.close(); //We need to remove this temporary file -- cgit v0.11.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor