epiphyt / embed-privacy

Embed Privacy prevents loading of embedded external content and allows your site visitors to opt-in.
https://epiph.yt/en/embed-privacy/
GNU General Public License v2.0
19 stars 12 forks source link

Fix % characters in overlays #158

Closed MatzeKitt closed 1 year ago

MatzeKitt commented 1 year ago

Bug/Problem

It may happen that an overlay contains a % sign, which is, when followed by a numeric sequence that represents an URL-decoded character, translated the the URL-encoded variant after replacing the content.

Test content:

<iframe class="instagram-media instagram-media-rendered" id="instagram-embed-0" src="https://www.instagram.com/p/CMUOMAcCjia/embed/captioned/?cr=1&amp;v=12&amp;wp=1080&amp;rd=https%3A%2F%2Fwww.warth.de&amp;rp=%2Fdamen%2F#%7B%22ci%22%3A0%2C%22os%22%3A1034.8650000014459%2C%22ls%22%3A1013.6300000012852%2C%22le%22%3A1031.3750000022992%7D" allowfullscreen frameborder="0" height="880" data-instgrm-payload-id="instagram-media-payload-0" style="background: white; max-width: 540px; width: calc(100% - 2px); border-radius: 3px; border: 1px solid rgb(219, 219, 219); box-shadow: none; display: block; margin: 0px 0px 12px; min-width: 326px; padding: 0px;"></iframe>

Steps to reproduce

  1. Add the HTML from above to a post/page.
  2. Visit frontend.

Version

1.6.4

Link

No response

Environment info

No response

Code of Conduct