30
Views
4
Comments
[Text and HTML Processing] Any docs?
text-and-html-processing
Web icon
Forge asset by Leonardo Fernandes
Application Type
Traditional Web

hi all,

anyone knows how to use this server action? I can't find any docs, thanks.

2018-05-10 22-41-57
Carlos Filipe Simões
Staff

Looking at the companion "textprocessing" module, I see the "TagWhitelistPreset", which includes a "Name" attribute:

And indeed, if you find references to that entity, you will find the "HTMLRemoveUnsafeTags" action, which then passes it on to the action you were looking for ("HTMLCleanByPreset"):

2023-09-19 15-09-54
Gianluca Ghioni

Thank you @Carlos Filipe Simões 


Unfortunately the functions working with "preset" as input can't be used because it is not know how those preset are defined. 

I'm trying to use the funcion "HtmlCleanByWhitelist" but I'm asking to myself whether there is or not any king of hierarchy in the data I'm passing:

I ask because if I pass "img - src" as allowed attribute, img tags are included in the clean html even if "img" is not specified in the allowed tags!

I'm not sure of how to use this library correctly, thanks

2025-07-22 10-30-27
Mandar Deshpande

Hi @Gianluca Ghioni 

To allow <img> tags:

 1. Add "img" to the AllowedTags list. 

2. Add necessary attributes to AllowedAttributes, for example:

 "img.src" 

"img.alt" 

"img.width" 

"img.height"

3. Pass this configured whitelist to CleanHtmlDocument.

UserImage.jpg
Deepak Raj M

hi @Gianluca Ghioni can your share oml file 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.