convertNonBreakingSpaces does not seem to work

Help
Dan Howard
2014-06-25
2014-06-26
  • Dan Howard

    Dan Howard - 2014-06-25

    I have a parser which sanitizes some HTML but when I sanitize, the nbsp entities are converted to spaces. I want all entities to remain as-is.

    I tried setting convertNonBreakingSpaces to false but it doesn't seem to make any difference.

        Source source = new Source(pseudoHTML);
        source.getTextExtractor().setConvertNonBreakingSpaces(false);
    

    any ideas?

     
  • Martin Jericho

    Martin Jericho - 2014-06-25

    Try this:

    Config.ConvertNonBreakingSpaces=false;

    Otherwise you'll have to include your source code for me to help further.
    Cheers
    Martin

     
    • Dan Howard

      Dan Howard - 2014-06-26

      Thanks! Works great!

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks