Skip to content
New issue

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

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

Already on GitHub? # to your account

Text showing up as links when they aren't supposed to #193

Open
4 tasks
kirkkwang opened this issue Mar 18, 2023 · 0 comments
Open
4 tasks

Text showing up as links when they aren't supposed to #193

kirkkwang opened this issue Mar 18, 2023 · 0 comments

Comments

@kirkkwang
Copy link
Contributor

Summary

Text like rtfa:0134 is showing up as a clickable link when it shouldn't be in the UV metadata pane.

Acceptance Criteria

  • rfta:0134 should not be a link

Screenshots or Video

image

Testing Instructions

  • On a work, update a metadata field with something like rtfa:0134 and save it
  • Navigate to the show page and pull out the UV metadata pane
  • Observe that rtfa:0134 is not a link

Notes

The regex needs to be updated.
https://github.com/scientist-softserv/iiif_print/blob/main/lib/iiif_print/metadata.rb#L99-L115

Consider:

MAKE_LINK_REGEX = %r{
  \b
  (
    (?:
      (?:https?|ftp)://
      [-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|]
    )
    |
    (?:
      www\d{0,3}\.
      [-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|]
    )
    |
    (?:
      [A-Z0-9.-]+\.[A-Z]{2,}\b
    )
  )
}ix.freeze
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant