HTML filter cannot remove attributes when string was divided #257

Closed
opened 8 months ago by nobody · 3 comments
nobody commented 8 months ago
Owner

AMO review:

I found one site not work even with 'HTML filter' option on
https://docs.aspose.com/pdf/cpp/aspose-pdf-for-cpp-21-1-release-notes/

Issues:

  • The main problem is that the website cannot be displayed without jQuery.
  • jQuery is embedded with crossorigin and integrity attributes.
  • The HTML filter cannot remove these attributes because the string (HTML source code) has been split into two parts by filterResponseData() exactly at the point where jQuery is embedded.

Solution:

  • Collect data in a string array first and change it only just before writing it back.

Interested users can install LocalCDN as a temporary extension to test it: https://codeberg.org/nobody/LocalCDN/wiki/Home#5-you-recently-changed-something-in-the-code-and-i-would-like-to-test-it-how-can-i-do-that

[AMO review:](https://addons.mozilla.org/de/firefox/addon/localcdn-fork-of-decentraleyes/reviews/1658094/) > I found one site not work even with 'HTML filter' option on > https://docs.aspose.com/pdf/cpp/aspose-pdf-for-cpp-21-1-release-notes/ Issues: * The main problem is that the website cannot be displayed without jQuery. * jQuery is embedded with crossorigin and integrity attributes. * The HTML filter cannot remove these attributes because the string (HTML source code) has been split into two parts by filterResponseData() exactly at the point where jQuery is embedded. Solution: * Collect data in a string array first and change it only just before writing it back. --- Interested users can install LocalCDN as a temporary extension to test it: https://codeberg.org/nobody/LocalCDN/wiki/Home#5-you-recently-changed-something-in-the-code-and-i-would-like-to-test-it-how-can-i-do-that
nobody added this to the v2.6.1 milestone 8 months ago
nobody added the
bug
label 8 months ago
nobody referenced this issue from a commit 8 months ago
nobody added the
testing
label 8 months ago
Poster
Owner

A public beta version is available: v2.6.1beta1

A public beta version is available: [v2.6.1beta1](https://codeberg.org/nobody/LocalCDN/releases/tag/v2.6.1beta1)

Thanks very much. It works fine.

Thanks very much. It works fine.
Poster
Owner

Thanks for testing 👍

Glad to hear that everything is working 😊 Feel free to reopen the issue if there are any problems.

I'll probably deploy an update next weekend.

Thanks for testing 👍 Glad to hear that everything is working 😊 Feel free to reopen the issue if there are any problems. I'll probably deploy an update next weekend.
nobody removed the
testing
label 8 months ago
nobody closed this issue 8 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.