0

Looking for a way to take some html like:

  <html>
    <head>
      <style>
        *.td {
         font-weight: bold;
        } 
      </style>
    </head>
    <body>
       <div>blah blah blah</div>
     </body>
  </html>

And run it through JTidy, and keep the CSS rule in the output of the parser.

The tag is gone in the final output.

mtyson
  • 8,196
  • 16
  • 66
  • 106

2 Answers2

0

That's not HTML. It is a mixture of CSS and HTML. You can't expect an HTML processor to understand it the way you do.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • Yeah, I had oversimplified the example - should be more clear now. – mtyson Mar 31 '11 at 00:56
  • It's still not HTML. – user207421 Mar 31 '11 at 01:10
  • That's what I get for typing examples in manually. JTidy inserts the type attr. It was the word2000 flag in JTidy stripping the style tag. Thanks for your attention. – mtyson Mar 31 '11 at 02:20
0

We had the word2000 flag set on JTidy. That is stripping the style tags.

mtyson
  • 8,196
  • 16
  • 66
  • 106