Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

API to validate string for well formed HTML

Avatar

Level 4

Hi,

Is there any API in CQ to validate the textfield string(User will enter meta information) entered is well formed HTML or not

 

Regards

Sankar

1 Accepted Solution

Avatar

Correct answer by
Level 10

No... Need to write a custom service to validate well formed HTML.

You can use some Java API like JTidy or any similar external services

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

No... Need to write a custom service to validate well formed HTML.

You can use some Java API like JTidy or any similar external services

Avatar

Level 10

We have a similar use case for parsing HTML (as opposed to validating) using JSOUP as a community article:

https://helpx.adobe.com/experience-manager/using/html-parser-service.html

Avatar

Level 4
        Thanks for your information :-)