diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2015-02-05 11:57:13 +0000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-02-06 21:10:59 +0000 |
commit | 675e1fe198298702ced8eab02a7df5164d66a8f0 (patch) | |
tree | 9bb8118c0b604929b1966e1f66b7cb52553e07fd | |
parent | f1359d1221b335c4856821948f89868f021135eb (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>
-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 e83c807e5aa8..44cf0b993d5d 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: */ |