Questions tagged [htmltidy]

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

168 questions
4
votes
1 answer

HTML::Tidy on Windows newline issue

When using HTML::Tidy on Windows to clean the output of an HTML::Element as_HTML method I'm getting the wrong type of newline. If I don't specify the newline in the HTML::Tidy constructor, I get my lines terminated by CRCRLF. If I specify 'LF'…
Oesor
  • 6,632
  • 2
  • 29
  • 56
4
votes
0 answers

HTML tidy linter:

I'm using tidy 5.2.0. The following works fine and shows no tidy linting errors: However, if I place the button in a span tag, tidy…
user1234795
  • 113
  • 1
  • 6
4
votes
1 answer

Tool to correct invalid CSV files

Is there any command-line tool or ruby library to clean/correct invalid .csv files, something like tidy for html? Example of error: unescaped non-successive double quotes. Related to: Regular expression to find and replace unescaped Non-successive…
Vlad Zloteanu
  • 8,464
  • 3
  • 41
  • 58
4
votes
1 answer

Tidying PHP and HTML Code?

I wonder if anyone could please help me I have been using HTML tidy and eclipses built-in function to tidy up my code. I am having great trouble with the following situations... when HTML is split between files via includes, having result…
user427165
4
votes
0 answers

Atom - linter-tidy not linting

I'm having an issue setting up atom for html. I installed linter for atom and linter-tidy linked from the atom linter's website. I put tidy.exe in C:/tidy/tidy.exe. In the linter-tidy settings I've tried no path to tidy, C:/tidy/tidy.exe and…
4
votes
0 answers

How can I get a specific attribute from a html dom node using libtidy

I am using C++ and libtidy to parse the html page. but the document for libtidy is so incomplete that I can hardly understand what do the API functions do. What I want is to get the specific attribute value from a html dom node, for example:
cao lei
  • 891
  • 1
  • 9
  • 19
4
votes
1 answer

HTML TIDY not indenting inline tags and script tags properly

I am trying to use HTMLTIDY for indenting my html file. I am using the command line version of it. tidy --doctype html5 --tidy-mark no --indent auto --indent-spaces 4 --wrap 0 --write-back yes --output-html yes --drop-empty-elements no…
Susheel Singh
  • 3,824
  • 5
  • 31
  • 66
4
votes
1 answer

Pretty Print / HTML Tidy for Google Web Toolkit (GWT)?

Is there a function for GWT (Google Web Toolkit) to pretty-print the html output of widgets? (apologies if the question is badly phrased - I'm not a GWT dev, but our developers are claiming that there's no way to do this) Currently all output is a…
Ilia Draznin
  • 1,026
  • 2
  • 12
  • 24
4
votes
1 answer

tidy_repair_string removes end line break (\n or \r)

$HTMLcodeOutput = tidy_repair_string($HTMLcode, array('show-body-only' => true, 'indent' => true)); will remove $HTMLcode' end of line. Ex : that's in the main box ##What does it do ? it does everything ##Output: Will output that's in the…
Cedric
  • 5,135
  • 11
  • 42
  • 61
4
votes
4 answers

Configure HTML Tidy to ignore PHP short start and end tags when inside html attributes

How can I keep HTML Tidy from converting PHP short tags when used as values in html attributes? Here's an example of what it currently does. It converts this: to this: I want HTML…
Ian
  • 11,920
  • 27
  • 61
  • 77
4
votes
2 answers

HTML Tidy. Please don't add end tags

I have three files. header.php index.php footer.php The header file contains from to
The index file contains page content The footer file contains
to Together they contain a normal HTML file with PHP When I…
Hedam
  • 2,209
  • 27
  • 53
3
votes
2 answers

Notepad++ HTML Tidy Unknown Exception Windows 7 x64

When I attempt to run HTML Tidy from the TextFX menu in NotePad++ (v5.9.3) I get the following error: Config file "C:\Program Files(x86)\Notepad++\plugins\Config\tidy\HTMLTIDY.CFG" not found! I'll pick whatever defaults I want to! After I click OK…
3
votes
1 answer

How do I set vim 7's html tidy options for "utf-8" encoding?

I need to run tidy in vim, using the usual: :compile tidy :make However, if I'm on an utf-8 file, I get errors that I don't see if I run tidy outside of vim, i.e., tidy -e -q -utf8 I get what I'm expecting
figgles
  • 31
  • 2
3
votes
1 answer

Python exception thrown by libtidy is amusingly impossible to catch

I am trying to use the tidy_document() function from tidylib to format an html document as xhtml before I can post it somewhere and a couple of steps up the stack, an exception is being thrown. The code is wrapped in a try...except block, with about…
legend855
  • 45
  • 7
3
votes
1 answer

Unable to attach HTMLTidy dll (libtidy.dll) to Visual Studio

Without much luck I've been trying to attach the HTMLTidy c++ library dll within Visual Studio, however everytime I get various errors with different builds. I'm adding a reference to the project and then manually selecting the dll, which has been…
wonea
  • 4,783
  • 17
  • 86
  • 139
1 2
3
11 12