Git Product home page Git Product logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
fixed at r229

Original comment by [email protected] on 5 May 2014 at 11:22

  • Changed state: Fixed

from java-html-sanitizer.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
This issue does not seems to be fixed properly. Try to test with span element 
with no attribute.

"<span> span text </span>"

or with attribute that is not explicitly allowed. 

"<span class="redtext"> span text </span>"

In both case, the span element will be removed even you add 
Sanitizer.FORMATTING or add span to allowed elements manually.

James

Original comment by [email protected] on 31 Jul 2014 at 1:41

from java-html-sanitizer.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Sanitizers.FORMATTING does not white-list class attributes.

Original comment by [email protected] on 31 Jul 2014 at 12:37

from java-html-sanitizer.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Mike

Thank you for the reply. 

But still the empty span element should be allowed with Sanitizers.FORMATTING 
which in fact is not. 

This library works amazing and help us a lot with our work .Thanks for the hard 
work.

James

Original comment by [email protected] on 4 Aug 2014 at 1:08

from java-html-sanitizer.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
<span> is, by default, one of the elements that is disallowed without 
attributes.

Certain elements, <img> and <a> for example, are dropped if they have no 
attributes that survive white-listing.  This prevents <img>s with rejected 
src="..."s from showing up as broken.

https://code.google.com/p/owasp-java-html-sanitizer/issues/detail?id=23 shows 
how to workaround this if you really want attribute-less <span>s in your output.

Original comment by [email protected] on 4 Aug 2014 at 12:29

from java-html-sanitizer.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
I think that makes sense. 

Thank you for your reply. Have a good day.

Original comment by [email protected] on 5 Aug 2014 at 7:29

from java-html-sanitizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.