LI & UL tags not working -- Issue#128

15 views
Skip to first unread message

Sandeep M

unread,
Oct 20, 2017, 2:50:30 PM10/20/17
to OWASP Java HTML Sanitizer Support
Hi Team,

LI & UL tags not rendering properly for me, if the code snippet is like below

</li></li></ul></div>

it was rendering as </li></ul></div>

one </li> is missing , please help me in this scenario

Jim Manico

unread,
Oct 20, 2017, 2:53:22 PM10/20/17
to owasp-java-html-...@googlegroups.com, Sandeep M

These are just end tags, can you give us the complete input and output?

Aloha, Jim

--
You received this message because you are subscribed to the Google Groups "OWASP Java HTML Sanitizer Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owasp-java-html-saniti...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike Samuel

unread,
Oct 20, 2017, 2:58:06 PM10/20/17
to OWASP Java HTML Sanitizer Support
I see https://github.com/OWASP/java-html-sanitizer/issues/128 but it's
not clear to me from that screenshot what your input is and what your
policy is. Could you please update the issue with

* A small input that demonstrates the problem
* Enough of your policy code to demonstrate the problem with that input
* The entire output that you'd expect given that input

Sandeep M

unread,
Oct 23, 2017, 4:44:55 AM10/23/17
to Jim Manico, owasp-java-html-...@googlegroups.com
Hi Jim,
Thanks for reply, below is the input and output snippet code
Input Snippet
<ul><li>1</li><li>2</li><ul><li>2.1</li><li>2.2</li></ul><ul>

Output Snippet
<ul><li>1</li><li>2</li><li><ul><li>2.1</li><li>2.2</li><li></li></ul></li></ul>

Please help me in this situation do I need to add any extra code to get my output 

On Saturday, October 21, 2017, Jim Manico <j...@manicode.com> wrote:

These are just end tags, can you give us the complete input and output?

Aloha, Jim


On 10/20/17 11:47 AM, Sandeep M wrote:
Hi Team,

LI & UL tags not rendering properly for me, if the code snippet is like below

</li></li></ul></div>

it was rendering as </li></ul></div>

one </li> is missing , please help me in this scenario
--
You received this message because you are subscribed to the Google Groups "OWASP Java HTML Sanitizer Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owasp-java-html-sanitizer-support+unsubscribe@googlegroups.com.

Mike Samuel

unread,
Oct 23, 2017, 8:11:55 AM10/23/17
to OWASP Java HTML Sanitizer Support, Jim Manico
It looks fine toe.  Nested lists should be inside an li.  https://html.spec.whatwg.org/multipage/grouping-content.html#the-ul-element says ul can contain only the below so it can't directly contain other lists.

Content model:
Zero or more li and script-supportingelements


Reply all
Reply to author
Forward
0 new messages