Questions tagged [htmltidy]

HTML Tidy is an html formatter used to pretty print existing markup.

168 questions
7
votes
3 answers

Feed rendered jsp pages through htmltidy

I have a Java project running on Glassfish that renders some ugly looking HTML. Its a side effect from using various internal and external JSP libraries. I would like to set up some sort of post-render filter that would feed the final HTML through…
Freiheit
  • 8,408
  • 6
  • 59
  • 101
6
votes
0 answers

htmltidy problems about script tags

Possible Duplicate: How do I get HTML Tidy to not put newline before closing tags? I have used htmltidy for few days, but there is always a "bug" happened when using it. This bug will wrap my script tag automatically !! I have to mention that…
EragonJ
  • 112
  • 1
  • 8
6
votes
3 answers

Prevent HTML Tidy from messing meta tags ( schema markup )

I am facing a serious problem with HTML Tidy (latest version -- https://html-tidy.org). In short: HTML tidy convert these lines of HTML codes
6
votes
2 answers

Split a html string in N parts

Does anybody have an example of spliting a html string (coming from a tiny mce editor) and splitting it into N parts using C#? I need to split the string evenly without splitting words. I was thinking of just splitting the html and using the…
Matt Brailsford
  • 2,209
  • 3
  • 28
  • 40
6
votes
2 answers

PHP Tidy class not found, error

I was writing some code for repair html string. I read some nice solutions which work with the Tidy PHP class but I had some troubles with it. What in this post is written, is exactly what I want but I need to install / load the PHP Tidy…
Roberto Rizzi
  • 1,525
  • 5
  • 26
  • 39
6
votes
1 answer

PHP HTML Tidy: size limit to buffer

I'm trying to use the HTML Tidy implementation that's part of PHP (http://www.php.net/manual/en/book.tidy.php) in order to reformat a large chunk of HTML. I'm having a problem wherein Tidy is truncating the output past a certain point (about…
MikeTheTall
  • 3,214
  • 4
  • 31
  • 40
5
votes
5 answers

Screenscraping the ugliest HTML you've ever seen in your life

I'm using PHP and libtidy to attempt to screen scrape what might possibly be the most horrendous and malformed use of HTML tables in history. The site closes few table, tr, td, font, or bold tags and consistently nests many different layers of…
Andy Baird
  • 6,088
  • 4
  • 43
  • 63
5
votes
2 answers

Hebrew characters processed by HTML Tidy turn into gibberish

I'm using HTML Tidy Online (http://infohound.net/tidy/) to tidy up some very old and messed up HTML file which contains some Hebrew characters. Whenever the page is processed by Tidy the output turns Hebrew characters into gibberish, even after…
Charles
  • 157
  • 1
  • 10
5
votes
1 answer

How do I use the W3C tidy-html5 bundle on Mac OS via TextMate OR command line?

I've installed the W3C tidy-html5 bundle here: ~/Library/Application Support/Avian/Pristine Copy/Bundles/tidy-html5 However, when I run the command in Terminal, it doesn't seem to recognize HTML5 tags. It seems like it's probably running the old…
suigeneris
  • 127
  • 7
5
votes
3 answers

Proper usage of JTidy to purify HTML

I am trying to use JTidy (jtidy-r938.jar) to sanitize an input HTML string, but I seem to have problems getting the default settings right. Often strings such as "hello world" end up as "helloworld" after tidying. I wanted to show what I'm doing…
ragebiswas
  • 3,818
  • 9
  • 38
  • 39
5
votes
1 answer

HTML Tidy stripping space at the start

File.html word ratti Command $ tidy File.html Output wordratti Desired output word ratti Where's the space? Log line 1 column 1 - Warning: missing declaration line 1 column 1 - Warning:…
Chankey Pathak
  • 21,187
  • 12
  • 85
  • 133
5
votes
2 answers

HTML Tidy new empty line after closing tags

When I use Tidy HTML in Coda It's clean but I don't like to have empty line
I try to edit config without success // config file for Coda PHP Toolkit Tidy FORMAT script //…
benoît
  • 1,473
  • 3
  • 13
  • 31
5
votes
2 answers

php tidy strange behaviour

I'm using php's tidy library to "clean and repair" some html coming from user input. Everything works fine, but i'm running into a problem that I can't figure out what its cause is. My code is like this: $tidy = new tidy(); $tidy_options =…
CdB
  • 4,738
  • 7
  • 46
  • 69
4
votes
1 answer

Using HTML Tidy in Visual C++ 2010 Windows Forms project

I am using VC++ 2010 Express and I am attempting to include HTML Tidy to perform cleanup on HTML code strings. What I want to do is process the HTML as a string (NOT from a file) and save the processed cleaned HTML to a string (NOT to a file). The…
Jason
  • 236
  • 1
  • 3
  • 9
4
votes
3 answers

Solutions for tidying HTML in .NET

Do people think there is any need of a good analogue of HTML Tidy for .NET? I am looking to create a product that will do things like filter HTML syntax for documents, performing various tasks, such as: cleaning up HTML generated by MicroSoft Word,…
Raymond
  • 21
  • 3
1
2
3
11 12