Questions tagged [htmltidy]

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

htmltidy
Filter by
Sorted by
Tagged with
1 vote
1 answer
222 views

How to tidy-up Processing Instructions in Marklogic

I have a content which is neither a valid HTML nor a XML in my legacy database. Considering the fact, it would be difficult to clean the legacy, I want to tidy this up in MarkLogic using xdmp:tidy. I ...
1 vote
1 answer
383 views

SublimeLinter ignore_match not working when extension is specified

I'm trying to get SublimeLinter and HTMLTidy to ignore certain php warnings. Specifically the missing <!DOCTYPE> declaration, inserting implicit <body>, and inserting missing 'title' ...
3 votes
0 answers
114 views

Can I stop HTML Tidy from reformatting scripts?

I use HTML tidy with gVim, to make XML more readable. By and large this works great, as it indents tags according to their nesting level. Lovely. However, it destroys the indenting in <script> ...
2 votes
2 answers
2k views

Using Tidy to clean HTML, HTML content is being changed, encoding problem?

I am fetching HTML from a smarty template and need to clean it (simply want to remove extra whitespace, and format / indent the HTML nicely), I'm using tidy to do something like: $html = $smarty->...
4 votes
0 answers
1k views

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 ...
1 vote
1 answer
565 views

iOS - Is there a good way to clean up HTML code?

In my app I am pulling in some HTML content from the web. Sometimes that markup isn't the most valid looking code and I would like to clean it up (fixing markup errors, etc.), similar to how HTMLTidy ...
7 votes
1 answer
8k views

I do not know how to get sublimelinter-html-tidy to work

I have sublime text 3, but after I installed sublimelinter-html-tidy through the 'Package Control: Install Package', nothing changed. I also have Emmit, Bracket Highlighter, Side Bar, and a few others ...
3 votes
1 answer
2k views

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 <filename>...
0 votes
0 answers
679 views

How to use HtmlTidy in a C# forms application?

I am coding a C# Windows Forms application and am using Html Agility Pack to generate html code. I am wanting to use HtmlTidy to tidy up the generated html. Can someone please inform me of how to ...
3 votes
2 answers
6k views

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 ...
1 vote
0 answers
214 views

Notepad++ HTML Tidy Unknown Exception Windows 7 x32

When I attempt to run HTML Tidy from the TextFX menu in NotePad++ (v6.5.5) I get the following error: Config file "C:\Program Files(x86)\Notepad++\plugins\Config\tidy\HTMLTIDY.CFG" not found! I'll ...
4 votes
1 answer
838 views

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 ...
2 votes
1 answer
898 views

Tidy adding too many newlines

I am quite new to tidy, and I am trying to format some HTML files. I have a section that looks like: <table> <tr><th class="x">Some stuff:</th><th class="x"><span ...
4 votes
2 answers
2k views

HTML Tidy. Please don't add end tags

I have three files. header.php index.php footer.php The header file contains from <html> to <div id='content'> The index file contains page content The footer file contains </div> ...
4 votes
1 answer
1k views

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 --...
5 votes
2 answers
3k views

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 <ul> <li>…</li> <!-- here --> <li>…</li> </ul> I try to edit config ...
1 vote
1 answer
230 views

How do I avoid prevent the removal of tags in PHP Tidy?

I'm using Tidy to produce clean output, but it somehow removes my <nav> tags. Are there any configuration options that will avoid this?
2 votes
0 answers
294 views

Issue with more than two linters working on sublime 3

I'm running sublime 3084 OSX 10.10.3 and i have three tabs open, one html document, one css and one javascript file. I have linters for all three installed but whenever I open the program only the css ...
0 votes
1 answer
69 views

htmltidy linter does not have a file in directory usr/local/bin

So I recently installed a few linters for sublimelinter and so far all work except htmltidy. I installed as directed using terminal (I'm running OSX) in the following way: sudo npm install -g ...
10 votes
2 answers
16k views

Notepad++ 6.1.x and HTMLTidy

Has someone got Notepad 6.1.x and HTMLTidy working and can tell me, where to download the dll / config. Using: Notepad++ 6.1.4 Win 7 x86 Yes, this Notepad++ / TidyHTML question has been already asked,...
15 votes
3 answers
77k views

TextFX HTML Tidy replacement (Format HTML) [closed]

So it appears on several sites that TextFX's HTML tidy is both excellent and has also not been supported since 2008. It appears that the latest version of Notepad++ completely breaks it in fact. Now ...
1 vote
0 answers
400 views

No output with gulp-htmltidy

I want to use tidy with gulp. But if I put it in the stream, I get no output, every single piece of html-code will be dropped. If I remove the pipe, I get the html. Do you have any clue? My Gulp: ...
2 votes
1 answer
455 views

libtidy .NET wrapper html5 [closed]

Is there anything as an HTML5 libtidy .NET wrapper ? I have been looking around and all I can find is Mark Beaton's Tidy Managed. It doesn't seem to support HTML5 gracefully. I have been using it in ...
2 votes
1 answer
3k views

PHP: html tidy repair string: making it not encase everything in <html>

Using the following code: $tidy = new tidy(); $clean = $tidy->repairString("<p>Hello</p>"); This encases the string in the whole shenanigans: <!DOCTYPE html PUBLIC "-//W3C//DTD ...
4 votes
0 answers
298 views

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 ...
2 votes
1 answer
897 views

Managed (.NET) library with HTML Tidy-like functionality?

Is there an HTML cleaner for .NET that can parse HTML and (for instance) convert it to a more machine friendly format such as XHTML? I've tried the HTML Agility Pack, but that fails to correctly ...
4 votes
1 answer
607 views

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 ...
4 votes
3 answers
951 views

Solutions for tidying HTML in .NET [closed]

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 ...
2 votes
1 answer
2k views

How to use the HTML Tidy .NET DLL wrapper in PowerShell?

I'm trying to use the HTML Tidy .NET wrapper in PowerShell 2.0. Here is a working example using C# (TestIt.cs included in the wrapper distribution): using Tidy; Document tdoc = new Document(); I'm ...
2 votes
1 answer
1k views

whats wrong with this c++ html tidy program

i have compiled an c tidy program i am getting an error and it is an example program given by them #include "tidy/tidy.h" #include <stdio.h> #include <errno.h> int main(int argc, char **...
1 vote
1 answer
2k views

How do you get Tidy to strip inline styles

I'm trying to use Tidy to clean up and transfer some content from an old system. The system has a lot of inline style overrides which I want to drop completely (I don't want to convert them to ...
5 votes
1 answer
1k views

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 ...
0 votes
0 answers
94 views

Thread hangs inside HTML Tidy function call, but only if being called from another process

Having the following application invocation chain, my application hangs: User starts .NET App1 → starts process .NET App2 → calls tidyParseSing() → hangs in there. Having the following application ...
5 votes
1 answer
2k views

HTML Tidy stripping space at the start

File.html word<i><span> <span>ratti</span></span></i> Command $ tidy File.html Output word<i>ratti</i> Desired output word<i> ratti</i&...
1 vote
1 answer
1k views

How to force tidy not to change HTML?

I am using following command to format HTML: tidy -xml --merge-divs no --wrap 0 --force-output yes --indent auto --indent-spaces 2 --quiet yes It works fine except it automatically closes tags like ...
0 votes
2 answers
1k views

Parse valid html (php - tidy)

I want to use tidy plugin but only for one string. The code that I'm using is : tidy_repair_string($string); My problem is that this script is in a file an I just use require once to include him. ...
1 vote
1 answer
2k views

HTML tidy - remove spaces between tags? how to reverse "tidying"?

So I use tidy to format html nicely: $html = 'one line html with many tags'; $config = array( 'indent' => true, 'indent-spaces' => 2, 'show-body-only' => true, 'wrap' ...
2 votes
1 answer
591 views

HTML Tidy, cleaning up MS Word markup

Have 10 years of archived article data, most of it riddled with MS Word save-as-html markup like <p class="MsoNormal"> First of all, is html tidy up to the task of stripping out MS Word ...
2 votes
2 answers
2k views

Remove duplicate xml header

html Tidy gives this as output for some reason: <?xml version="1.0" encoding="utf-16"?> <?xml version="1.0" encoding="utf-16"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ...
1 vote
2 answers
595 views

Strange Class-Autoloading in Zend Framework 2 disturbs the finding of tidy class

I'm using Zend Framework 2 to do some work, here I need to cleanup user's input, which is in Html. I've used php tidy extension [see this] before in plain php without the use of namespace and ...
0 votes
1 answer
126 views

£ getting converted to ? by HTML Tidy, EncodingType?

I am cleaning a HTML file using HTML Tidy, well the .NET version called TidyManaged, and my "£" symbols are being converted to "?" ie: Income (£) becomes: Income (�) I believe it is to do with ...
0 votes
1 answer
152 views

Python Error: lxml + tidylib / I'd like to solve grabled character

everyone. Please let me ask a following question. I use python 2.6 and I wrote this script. But I got an Error. #!/usr/bin/env python # -*- coding: utf-8 -*- import cchardet, urllib2 import lxml.html ...
0 votes
2 answers
1k views

HTML Tidy strip tags

I'm working on dynamic template for bootstrap, and i'm using HTML Tidy. However it seem HTML Tidy remove specific tags, for example: <b class="caret"></b> How to ...
0 votes
1 answer
178 views

tidy -clean is not removing <font> tags

Hi I am using Tidy in command line. everything is working fine but -clean y is not working. tidy -m sampleon.html --clean y --doctype "strict" after conversion there is no much difference. it has ...
0 votes
1 answer
164 views

Getting HTMLTidy in SublimeText2 to stop stripping doctype/html/body

I'm a very new Sublime Text 2 user and I'm trying to setup a usable HTML Tidy package. I've installed SublimeHtmlTidy and I've left the settings unchanged. I've added shortcut { "keys": ["ctrl+alt+t"...
1 vote
1 answer
1k views

Can we enable PHP libraries using ini_set(); function?

I have a server that does not support server configuration. I am unable to edit php.ini file in anyway. I need to enable the libtidy (the HTML tidy library). I was wondering if there is any way that ...
5 votes
2 answers
1k views

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 ...
2 votes
1 answer
630 views

Prevent HTML Tidy from stripping PHP

I have gone through the docs but am not seeing how I can prevent tidy from stripping my PHP. My config is as follows: anchor-as-name: no doctype: omit drop-empty-paras: no fix-uri: no literal-...
0 votes
1 answer
689 views

Missing header files for tidy html for c

I want to create a project using c++ using html tidy to get an xml file.(Almost this) But I have basic knowledge of c++ programming and haven't ever worked with other APIs and libraries. In the ...
0 votes
1 answer
411 views

PHP Tidy : Unexpected Special Characters after parsing

I am using PHP Tidy to reduce the document size while loading. Here is the code i am using for PHP Tidy. $html_output = ob_get_clean(); $tidyConfig = array( 'indent' => false, 'hide-comments' =>...