summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdftext_embeddertest.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2017-05-19 22:17:38 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-20 05:30:10 +0000
commit6c8ed646d1fcb8cce5a01c843c5149d989e6d5f0 (patch)
tree8561afc3d2f2e705ea6c642acd8645da00b9d096 /fpdfsdk/fpdftext_embeddertest.cpp
parentd15ce4c1e088e8bc084b52b0acdb5f0ef6597f95 (diff)
downloadpdfium-6c8ed646d1fcb8cce5a01c843c5149d989e6d5f0.tar.xz
Better identify web links by trimming irrelevant charschromium/3107
Sometimes, web links are written with other text such as punctuations which makes the extracted web links invalid. We improve this by trimming invalid chars at the end of host name only URLs. For example, host names never ends with ';' or ','. BUG=chromium:720578 Change-Id: Id619025b2153531376d268a69a3a89c3d49fce08 Reviewed-on: https://pdfium-review.googlesource.com/5692 Commit-Queue: Wei Li <weili@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdftext_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdftext_embeddertest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/fpdftext_embeddertest.cpp b/fpdfsdk/fpdftext_embeddertest.cpp
index 3d496bc06f..65f5734122 100644
--- a/fpdfsdk/fpdftext_embeddertest.cpp
+++ b/fpdfsdk/fpdftext_embeddertest.cpp
@@ -382,7 +382,7 @@ TEST_F(FPDFTextEmbeddertest, WebLinksAcrossLines) {
EXPECT_TRUE(pagelink);
static const char* const kExpectedUrls[] = {
- "http://example.com?", // from "http://www.example.com?\r\nfoo"
+ "http://example.com", // from "http://www.example.com?\r\nfoo"
"http://example.com/", // from "http://www.example.com/\r\nfoo"
"http://example.com/test-foo", // from "http://example.com/test-\r\nfoo"
"http://abc.com/test-foo", // from "http://abc.com/test-\r\n\r\nfoo"