Menu

Enable to customize HTML renderer

2008-06-19
2013-01-03
  • Erik Putrycz

    Erik Putrycz - 2008-06-19

    One of my favorite features of Jericho is the HTML to text transformation. However, I would like to be able to strip all links. Currently I think this is all pretty much forged into the Renderer class. Any chances to refactor it to enable a better customization?
    I can submit a patch for it if there is any interest...

    Erik.

     
    • Martin Jericho

      Martin Jericho - 2008-06-20

      Do you mean something link the Renderer.setIncludeHyperlinkURLs property in 2.6-dev?

      If you're not using 2.6-dev I'd recommend you do, as there were serious problems with the Renderer algorithm in 2.5.

      The problem with allowing more customisation is it would require a lot of documentation.  Your best option if the current properties don't achieve your goals is to either request it as a new feature (I'm usually reasonably responsive) or create a new Renderer class starting with the existing one as a template.

      Cheers
      Martin

       
      • Erik Putrycz

        Erik Putrycz - 2008-06-23

        I'm still on 2.5 because it is the only version available in the maven repository. Any chances you could publish a 2.6 beta?

        And setInclideHyperlinkURLs sounds to be exactly what I need! Thanks!!

         
        • Martin Jericho

          Martin Jericho - 2008-06-24

          Hopefully I'll get around to publishing 2.6 this week.

           

Log in to post a comment.