diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2015-02-05 11:57:13 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-02-07 00:45:46 +0100 |
commit | fafd6cd4f784e5b65548af699bc25502f10a4b8d (patch) | |
tree | b6d38a27f9cf7cf791f07cdb916ee3fb363946ff | |
parent | 4327b7882c38005d89b07e76814705d1c53f3161 (diff) |
tdf#76291 unit test for html export href encoding
Change-Id: I273af8b570adfcb7bfb784495bc31d2f4f1ee00b
Reviewed-on: https://gerrit.libreoffice.org/14333
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit 675e1fe198298702ced8eab02a7df5164d66a8f0)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | sw/qa/extras/htmlexport/data/tdf76291.odt | bin | 0 -> 10342 bytes | |||
-rw-r--r-- | sw/qa/extras/htmlexport/htmlexport.cxx | 9 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/htmlexport/data/tdf76291.odt b/sw/qa/extras/htmlexport/data/tdf76291.odt Binary files differnew file mode 100644 index 000000000000..68588c8763b6 --- /dev/null +++ b/sw/qa/extras/htmlexport/data/tdf76291.odt diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index d8c673c2e4ee..aaa43d6eb4a4 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -233,6 +233,15 @@ DECLARE_HTMLEXPORT_TEST(testExportCheckboxRadioButtonState, "checkbox-radiobutto assertXPathNoAttribute(pDoc, "/html/body/form/p[4]/input", "checked"); } +DECLARE_HTMLEXPORT_TEST(testExportUrlEncoding, "tdf76291.odt") +{ + htmlDocPtr pDoc = parseHtml(maTempFile); + CPPUNIT_ASSERT(pDoc); + + // Test URI encoded hyperlink with Chinese characters + assertXPath(pDoc, "/html/body/p/a", "href", "http://www.youtube.com/results?search_query=%E7%B2%B5%E8%AA%9Emv&sm=12"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |