Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip null (\x00) characters from the URLs in LinkAnnotations (issue 6832) #6834

Merged
merged 1 commit into from Jan 5, 2016
Merged

Strip null (\x00) characters from the URLs in LinkAnnotations (issue 6832) #6834

merged 1 commit into from Jan 5, 2016

Conversation

Snuffleupagus
Copy link
Collaborator

Apparently some PDF files can have annotations with URI entries ending with null characters, thus breaking the links.
To handle this edge-case of bad PDFs, this patch moves the already existing utility function from ui_utils.js into util.js, in order to fix those URLs.

Fixes #6832.

@Snuffleupagus Snuffleupagus changed the title Strip null (\x00) characters the URLs in LinkAnnotations (issue 6832) Strip null (\x00) characters from the URLs in LinkAnnotations (issue 6832) Jan 4, 2016
…e 6832)

Apparently some PDF files can have annotations with `URI` entries ending with `null` characters, thus breaking the links.
To handle this edge-case of bad PDFs, this patch moves the already existing utility function from `ui_utils.js` into `util.js`, in order to fix those URLs.

Fixes 6832.
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Jan 5, 2016

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/1791dad1de1d084/output.txt

@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Jan 5, 2016

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://107.22.172.223:8877/93673a00fee0287/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jan 5, 2016

From: Bot.io (Linux)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/919a7184c177f2a/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jan 5, 2016

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/93673a00fee0287/output.txt

Total script time: 20.93 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Jan 5, 2016

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/919a7184c177f2a/output.txt

Total script time: 21.40 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

timvandermeij added a commit that referenced this pull request Jan 5, 2016
Strip `null` (\x00) characters from the URLs in LinkAnnotations (issue 6832)
@timvandermeij timvandermeij merged commit 4399d01 into mozilla:master Jan 5, 2016
@timvandermeij
Copy link
Contributor

Thank you for the patch! It also fixed http://www.w3.org/WAI/WCAG20/Techniques/working-examples/PDF11/links.pdf.

@Snuffleupagus Snuffleupagus deleted the issue-6832 branch January 5, 2016 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hyperlinks won't open from within PDF in Firefox 43.0.3
3 participants