java - How to get list of valid tags of Jsoup whitelist? -


how list of valid tags of given jsoup whitelist?

i can't find such function in docs @ jsoup whitelist docs. use coldfusion, java solution or hint fine. guess translate it.

if want go reflection route, can below grabs access tagnames set, converts array of org.jsoup.safety.whitelist$tagname objects (which contain tag names) , appends tostring() values of objects array.

<cfscript>  whitelist = createobject("java", "org.jsoup.safety.whitelist"); collection = []; tags = whitelist.getclass().getdeclaredfield("tagnames"); tags.setaccessible(true);  // portion uses relaxed whitelist example (tag in tags.get(whitelist.relaxed()).toarray()) {     arrayappend(collection, tag.tostring()); }  writedump(collection);  </cfscript> 

if need attributes and/or protocols fields, it's similar approach there more iterate through since maps.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -