question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow wildcards in whitelist attributes

See original GitHub issue

HTML5 allows the use of data-foo, data-foo-bar, etc to specify information on elements. These are relatively harmless and should only contain text.

Currently, each data- attribute needs to be specified explicitly on a whitelist so that it’s not removed by Jsoup.clean(). Can we add support for either:

  1. Wildcard attributes, e.g. Whitelist.relaxed().addAttributes("a", "data-*") or
  2. A new function, like Whitelist.relaxed().allowDataAttributes("a")

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
swapabcommented, Feb 11, 2020

I am trying out jsoup to validate html pages. Works great so far. Would have been awesome, if wildcards were possible with jsoup.

0reactions
jhycommented, Nov 15, 2017

(Closing out old, dormant bugs. If you are still impacted by this, please reopen & vote.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I use a wildcard in the sender Whitelist, or ... - N-able
You can use the asterisk symbol (*) as a wildcard, in the Sender Whitelist and Sender Blacklist. To add entries: Navigate to the...
Read more >
Using Wildcards in Policies - the Mimecast Community
Wildcard entries can consist of all sub-domains or complete the address or domain variations in these situations. Wildcard entries cannot be ...
Read more >
Support wildcard in whitelisted_return_urls #943 - ory/kratos
Wildcard redirect URLs are usually considered bad practice because the allow developers to be lazy and whitelist every domain on the planet, ...
Read more >
CORS: Cannot use wildcard in Access-Control-Allow-Origin ...
Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true. doesn't work on firefox either. My Node.js setup is: var allowCrossDomain = ...
Read more >
How do I add Domain Wildcards to My Block or Allow Lists?
Adding wildcards to your block or allow lists is accomplished by an implied wildcard. Please see the examples below for the syntax of ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found