Questions tagged [tidy]

Tidy is a C library for cleaning up "bad" HTML. Don't use this tag for questions about keeping your code tidy.

Tidy is a library written in C for converting HTML that is syntactically incorrect to correct HTML or to XHTML. Especially useful when you are scraping web pages with curl and XML parsing functions because XML parsing functions don't accept bad HTML. Extensions for Tidy are available in PHP and Perl. The Tidy extension in PHP supports functions to covert bad HTML to XHTML with various options like dropping deprecated tags like font tag and hiding comments and dropping proprietary tags and dropping empty paragraphs and a lot more.

571 questions
0
votes
1 answer

How do I get tidy to do what I want?

I'm trying to get tidy to convert a html document to xml document on windows But there should be no additional linebreaks (markup shall stay) I would believe that the following command line should do the trick, but somehow it's not working. tidy…
TheGeekGuy
  • 137
  • 1
  • 7
0
votes
1 answer

Why can some PHP objects be converted to a string

I was looking into PHP tidy and I saw the following code $tidy = new tidy; $tidy->parseString($html, $config, 'utf8'); $tidy->cleanRepair(); // Output echo $tidy; Tidy here is an object. Why isn't this throwing a Catchable fatal error: Object of…
Luke Madhanga
  • 6,871
  • 2
  • 43
  • 47
0
votes
1 answer

Is there any open source library for tidy up Javascript using Javascript inside browser?

Is there any library that I can use to convert code like this: function () { var a = 1; } to code like this: function () { var a = 1; } Inside my browser. Because I'm using gh-pages in Github I don't have a back-end so I'm looking only for…
Iman Mohamadi
  • 6,552
  • 3
  • 34
  • 33
0
votes
2 answers

How can I get tidy to allow my custom attributes?

function myTidy($content) { $tidyConfig = array( 'indent' => false, //don't indent 'doctype' => 'omit', //don't include doctype 'wrap' => 0, // don't…
Frank Farmer
  • 38,246
  • 12
  • 71
  • 89
0
votes
1 answer

Tidy or TinyMce stripping essential html attributes in umbraco 4.7.2

I've followed all guidelines related to this issue, including disabling tidy in umbracoSettings.config file: False and explicitly setting valid elements and attributes in the tinyMceConfig.config file. Also, I…
dxrsm
  • 127
  • 1
  • 9
0
votes
1 answer

PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/tidy.dll' - No such process in Unknown on line 0

I've recently installed Cygwin to my new work laptop and ever since I've being bombarded with the above Warning message like commercial advertisements whenever I execute commands that involves php scripts PHP Startup: Unable to load dynamic library…
dale
  • 439
  • 3
  • 11
  • 28
0
votes
1 answer

configure tidy to escape the unknown xml tags

I am using tidy to make HTML entered by the user well-formed and i have configured tidy to accept only few html tags. Is there a way i can tell tidy to escape sequence the xml tags that are not known. Example input and the expected output are given…
keshav84
  • 2,291
  • 5
  • 25
  • 34
0
votes
0 answers

Tidy with PHP - output ,