OWASP / java-html-sanitizer

Takes third-party HTML and produces HTML that is safe to embed in your web application. Fast and easy to configure.
Other
843 stars 213 forks source link

How to give input to jar file and get the processed output? #233

Closed pr0t0nus3rxyz closed 3 years ago

pr0t0nus3rxyz commented 3 years ago

I am not able to run the jar file directly even with java -cp owasp-java-html-sanitizer-20160924.1.jar org.owasp.html.HtmlSanitize. It says main method not found. Can anyone please share how can i run the jar file and give input with sanitized output.

Thanks in advance

jmanico commented 3 years ago

This will help!

https://github.com/OWASP/java-html-sanitizer/blob/master/docs/getting_started.md

-- Jim Manico @Manicode

On Aug 12, 2021, at 2:36 AM, pr0t0nus3rxyz @.***> wrote:

 I am not able to run the jar file directly even with java -cp owasp-java-html-sanitizer-20160924.1.jar org.owasp.html.HtmlSanitize. It says main method not found. Can anyone please share how can i run the jar file and give input with sanitized output.

Thanks in advance

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

mikesamuel commented 3 years ago

This isn't really a command line tool since there's no way to specify a policy from the command line. You should be able to create a main class that uses a policy of your choosing easily enough though.