collectiveaccess / pawtucket2

Pawtucket Improved
GNU General Public License v3.0
82 stars 75 forks source link

highlighting breaks images if you search for term 'object' #109

Open Monica-Wood opened 1 month ago

Monica-Wood commented 1 month ago

Here's a "fun" one. We discovered when perusing through logs, that highlighting will also put the around values in the images 'src' attribute, causing the image to be broken if searching on the term 'object'

2024/08/08 11:35:57 [error] 1451#0: *326489 open() "/srv/pawtucket/media/collectiveaccess/images/1/4183_ca_<span class="highlightText">object</span>_representations_media_134_medium.jpg" failed (2: No such file or directory), client: 172.0.0.1, server: example.com, request: "GET /media/collectiveaccess/images/1/4183_ca_%3Cspan%20class=%22highlightText%22%3Eobject%3C/span%3E_representations_media_134_medium.jpg HTTP/1.1", host: "example.com" changed ips and urls for privacy

Screenshot 2024-08-08 at 12 29 28 PM

collectiveaccess commented 1 month ago

Pushed a fix for this. Please let me know how it works for you.