HTML_Tidy.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. <!DOCTYPE html>
  2. <html dir="ltr">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  5. <title>Options/HTML Tidy - XOWA</title>
  6. <link rel="shortcut icon" href="https://gnosygnu.github.io/xowa/xowa_logo.png" />
  7. <link rel="stylesheet" href="https://gnosygnu.github.io/xowa/xowa_common.css" type="text/css">
  8. </head>
  9. <body class="mediawiki ltr sitedir-ltr ns-0 ns-subject skin-vector action-submit vector-animateLayout" spellcheck="false">
  10. <div id="mw-page-base" class="noprint"></div>
  11. <div id="mw-head-base" class="noprint"></div>
  12. <div id="content" class="mw-body">
  13. <h1 id="firstHeading" class="firstHeading"><span>Options/HTML Tidy</span></h1>
  14. <div id="bodyContent" class="mw-body-content">
  15. <div id="siteSub">From XOWA: the free, open-source, offline wiki application</div>
  16. <div id="contentSub"></div>
  17. <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
  18. <div id='xocfg_body'>
  19. <!-- TEXT:err_msg -->
  20. <div id='xocfg_err'></div>
  21. <div>
  22. <!-- BTN:info -->
  23. <span class='xoimg_btn_x16 xoimg_help_tip' href='javascript:void(0)' onclick='return xo.cfg_edit.help__toggle_all()' title='toggle all help'>&nbsp;</span>
  24. <!-- COMBO:cfg_grps -->
  25. <select id='xocfg_nav_select' onchange='xo.cfg_edit.select__send(this);' onkeyup='xo.cfg_edit.select__by_keypress(event, this);' accesskey='l'>
  26. <option value='xowa.app.security' >App - Security</option>
  27. <option value='xowa.app.startup' >App - Startup</option>
  28. <option value='xowa.app.dbs' >App - Databases</option>
  29. <option value='xowa.app.update' >App - Update</option>
  30. <option value='xowa.gui.general' >Gui - General</option>
  31. <option value='xowa.gui.tabs' >Gui - Tabs</option>
  32. <option value='xowa.gui.url_bar' >Gui - Address bar</option>
  33. <option value='xowa.gui.menus' >Gui - Menus</option>
  34. <option value='xowa.gui.shortcuts' >Gui - Shortcuts</option>
  35. <option value='xowa.gui.nightmode' >Gui - Nightmode</option>
  36. <option value='xowa.wiki.hdumps' >Wiki - HTML Databases</option>
  37. <option value='xowa.wiki.edit' >Wiki - Editing</option>
  38. <option value='xowa.bldr.general' >Import - General</option>
  39. <option value='xowa.bldr.db' >Import - Database</option>
  40. <option value='xowa.bldr.page_sync' >Import - Page sync</option>
  41. <option value='xowa.bldr.dansguardian' >Import - Dansguardian</option>
  42. <option value='xowa.html.css' >HTML - CSS</option>
  43. <option value='xowa.html.page' >HTML - Page</option>
  44. <option value='xowa.html.tidy' selected='selected'>HTML - Tidy</option>
  45. <option value='xowa.html.scripting' >HTML - Scripting</option>
  46. <option value='xowa.files.general' >Files - General</option>
  47. <option value='xowa.files.apps' >Files - Apps</option>
  48. <option value='xowa.addon.search' >Addon - Search</option>
  49. <option value='xowa.addon.fulltext_search' >Addon - Full-text search</option>
  50. <option value='xowa.addon.category' >Addon - Category</option>
  51. <option value='xowa.addon.http_server' >Addon - HTTP Server</option>
  52. <option value='xowa.addon.scribunto' >Addon - Scribunto</option>
  53. <option value='xowa.addon.math' >Addon - Math</option>
  54. <option value='xowa.addon.score' >Addon - Score</option>
  55. <option value='xowa.addon.popups' >Addon - Popups</option>
  56. <option value='xowa.addon.wikibase' >Addon - Wikidata</option>
  57. <option value='xowa.dev.general' >Dev - General</option>
  58. <option value='xowa.app.settings' >App - Settings</option>
  59. </select>
  60. <!-- LINK:cfg_link -->
  61. <div style='float:right;margin:2px 7px;'>
  62. <a id='options_lnk'>options link</a>
  63. </div>
  64. </div>
  65. <div id='cfg_grps'>
  66. <!-- TEXT:page_help -->
  67. <div>
  68. <p id='page_help_para'><p>HTML Tidy is a software library whose purpose is to fix invalid HTML. It is enabled on all Wikimedia wikis. Without HTML Tidy, a small percentage of pages will render incorrectly (broken tables; extended bold; horizontal scroll bar; misplaced images), etc. See <a href="/wiki/Diagnostics/HTML_Tidy" id="xolnki_24" title="Diagnostics/HTML Tidy" tabindex="-1">Diagnostics/HTML_Tidy</a> for examples.
  69. </p>
  70. <p>For more info about XOWA's customized JTidy jar, see <a href="/wiki/App/Xtn/Mediawiki/Tidy/JTidy" id="xolnki_25" title="App/Xtn/Mediawiki/Tidy/JTidy" tabindex="-1">App/Xtn/Mediawiki/Tidy/JTidy</a>
  71. </p>
  72. </p>
  73. </div>
  74. <h2>General</h2>
  75. <div class="xocfg_row flex_div">
  76. <!-- BTN:help_item -->
  77. <div class='xocfg_itm_help'>
  78. <span class='xoimg_btn_x16 xoimg_help_tip' href='javascript:void(0)' onclick='return xo.help.toggle("xowa.html.tidy.enabled")' title='view more info'>&nbsp;</span>
  79. </div>
  80. <!-- TEXT:key -->
  81. <div id='xowa.html.tidy.enabled__name' class='xocfg_itm_name'>Enabled</div>
  82. <!-- BTN:undo -->
  83. <div id='xowa.html.tidy.enabled__undo' data-xocfg-type='bool' class='xocfg_itm_delete xocfg_itm_hide'>
  84. <span class='xoimg_btn_x16 xoimg_list_undo' onclick='return xo.cfg_edit.delete__send("xowa.html.tidy.enabled")' title="reset to &quot;y&quot;">&nbsp;</span>
  85. </div>
  86. <!-- TEXT:val -->
  87. <div class='xocfg_itm_data'>
  88. <input id="xowa.html.tidy.enabled" data-xocfg-key="xowa.html.tidy.enabled" data-xocfg-type="bool" accesskey="d" class="xocfg_data__bool" type="checkbox" checked="checked"></input></div>
  89. <!-- HIDDEN:key,ctx -->
  90. <input type='hidden' id='xowa.html.tidy.enabled__key_box' value='xowa.html.tidy.enabled'></input>
  91. <input type='hidden' id='xowa.html.tidy.enabled__ctx_box' value='app'></input>
  92. </div>
  93. <!-- DIV:help -->
  94. <div id='xowa.html.tidy.enabled_help_div' class='xohelp_div'>
  95. <div id='xowa.html.tidy.enabled_help_msg' class='xohelp_msg'><p>Choose if HTML tidy is enabled
  96. </p>
  97. </div>
  98. </div>
  99. <div class="xocfg_row flex_div">
  100. <!-- BTN:help_item -->
  101. <div class='xocfg_itm_help'>
  102. <span class='xoimg_btn_x16 xoimg_help_tip' href='javascript:void(0)' onclick='return xo.help.toggle("xowa.html.tidy.engine")' title='view more info'>&nbsp;</span>
  103. </div>
  104. <!-- TEXT:key -->
  105. <div id='xowa.html.tidy.engine__name' class='xocfg_itm_name'>Tidy engine</div>
  106. <!-- BTN:undo -->
  107. <div id='xowa.html.tidy.engine__undo' data-xocfg-type='list:xowa.html.tidy.engine' class='xocfg_itm_delete xocfg_itm_hide'>
  108. <span class='xoimg_btn_x16 xoimg_list_undo' onclick='return xo.cfg_edit.delete__send("xowa.html.tidy.engine")' title="reset to &quot;jtidy&quot;">&nbsp;</span>
  109. </div>
  110. <!-- TEXT:val -->
  111. <div class='xocfg_itm_data'>
  112. <select id="xowa.html.tidy.engine" data-xocfg-key="xowa.html.tidy.engine" data-xocfg-type="list:xowa.html.tidy.engine" accesskey="d" class="xocfg_data__list" size="3">
  113. <option value="tidy">tidy</option>
  114. <option value="jtidy" selected="selected">jtidy</option>
  115. <option value="vnu">vnu</option>
  116. </select>
  117. </div>
  118. <!-- HIDDEN:key,ctx -->
  119. <input type='hidden' id='xowa.html.tidy.engine__key_box' value='xowa.html.tidy.engine'></input>
  120. <input type='hidden' id='xowa.html.tidy.engine__ctx_box' value='app'></input>
  121. </div>
  122. <!-- DIV:help -->
  123. <div id='xowa.html.tidy.engine_help_div' class='xohelp_div'>
  124. <div id='xowa.html.tidy.engine_help_msg' class='xohelp_msg'><p>Choose an HTML tidy engine:
  125. </p>
  126. <ul>
  127. <li> <b><a href="http://tidy.sourceforge.net/" rel="nofollow" class="external text" tabindex="-1">tidy</a></b>: The same library that is used by WMF wikis. Choose <code>tidy</code> if you want to run the official tidy library that WM uses. Note that you must download the binary if you are on Linux / Mac OS X.
  128. </li>
  129. <li> <b><a href="http://jtidy.sourceforge.net/" rel="nofollow" class="external text" tabindex="-1">jtidy</a></b>: A Java implementation of the tidy library. Choose <code>jtidy</code> if you don't want to install a platform specific binary. Note that JTidy is not a 100% implementation of tidy, though it appears to be quite close (at about 95%).
  130. </li>
  131. </ul>
  132. </div>
  133. </div>
  134. <h2>Tidy binary</h2>
  135. <div class="xocfg_row flex_div">
  136. <!-- BTN:help_item -->
  137. <div class='xocfg_itm_help'>
  138. <span class='xoimg_btn_x16 xoimg_help_tip' href='javascript:void(0)' onclick='return xo.help.toggle("xowa.html.tidy.cmd")' title='view more info'>&nbsp;</span>
  139. </div>
  140. <!-- TEXT:key -->
  141. <div id='xowa.html.tidy.cmd__name' class='xocfg_itm_name'>Process</div>
  142. <!-- BTN:undo -->
  143. <div id='xowa.html.tidy.cmd__undo' data-xocfg-type='io.cmd' class='xocfg_itm_delete xocfg_itm_hide'>
  144. <span class='xoimg_btn_x16 xoimg_list_undo' onclick='return xo.cfg_edit.delete__send("xowa.html.tidy.cmd")' title="reset to &quot;~{<>bin_plat_dir<>}tidy\tidy|-utf8 --force-output y --quiet y --tidy-mark n --doctype '' --wrap 0 --indent y --quote-nbsp y --literal-attributes y --wrap-attributes n --fix-uri n --fix-backslash n --enclose-block-text y -o &quot;~{target}&quot; &quot;~{source}&quot;&quot;">&nbsp;</span>
  145. </div>
  146. <!-- TEXT:val -->
  147. <div class='xocfg_itm_data'>
  148. <input class="xocfg_data__io_cmd__exe__txt" id="xowa.html.tidy.cmd-exe" data-xocfg-key="xowa.html.tidy.cmd" data-xocfg-type="io.cmd-exe" accesskey="d" type="text" value="~{<>bin_plat_dir<>}tidy\tidy"></input>
  149. <span class="xoimg_btn_x16 xoimg_app_configure" onclick='xo.cfg_edit.io_cmd__select("file", "xowa.html.tidy.cmd-exe", "Please select a file.");'>&nbsp;</span><br/>
  150. <input class="xocfg_data__io_cmd__arg__txt" id="xowa.html.tidy.cmd-arg" data-xocfg-key="xowa.html.tidy.cmd" data-xocfg-type="io.cmd-arg" accesskey="d" type="text" value="-utf8 --force-output y --quiet y --tidy-mark n --doctype '' --wrap 0 --indent y --quote-nbsp y --literal-attributes y --wrap-attributes n --fix-uri n --fix-backslash n --enclose-block-text y -o &quot;~{target}&quot; &quot;~{source}&quot;">
  151. </div>
  152. <!-- HIDDEN:key,ctx -->
  153. <input type='hidden' id='xowa.html.tidy.cmd__key_box' value='xowa.html.tidy.cmd'></input>
  154. <input type='hidden' id='xowa.html.tidy.cmd__ctx_box' value='app'></input>
  155. </div>
  156. <!-- DIV:help -->
  157. <div id='xowa.html.tidy.cmd_help_div' class='xohelp_div'>
  158. <div id='xowa.html.tidy.cmd_help_msg' class='xohelp_msg'><p>XOWA defaults to the following tidy arguments:
  159. </p>
  160. <pre style='overflow:auto;'>
  161. -utf8 --force-output y --quiet y --tidy-mark n --doctype '''' --wrap 0 --indent y --quote-nbsp y --literal-attributes y --wrap-attributes n --fix-url n --fix-backslash n --enclose-block-text y -o &quot;~{target}&quot; &quot;~{source}&quot;
  162. </pre>
  163. <dl>
  164. <dt> -utf8
  165. </dt>
  166. <dd> default is ascii
  167. </dd>
  168. <dt> --force-output y
  169. </dt>
  170. <dd> always generate output; do not fail on error
  171. </dd>
  172. <dt> --quiet y
  173. </dt>
  174. <dd> suppress command-line header
  175. </dd>
  176. <dt> --tidy-mark n
  177. </dt>
  178. <dd> do not add tidy watermark
  179. </dd>
  180. <dt> --doctype &#39;&#39;&#39;&#39;
  181. </dt>
  182. <dd> default is auto (TRANSITIONAL); causes weird quirks with short text lines on some wikis (tr.wikibooks.org)
  183. </dd>
  184. <dt> --wrap 0
  185. </dt>
  186. <dd> default is 80; do not limit lines to 80 chars
  187. </dd>
  188. <dt> --indent y
  189. </dt>
  190. <dd> indent block levels
  191. </dd>
  192. <dt> --quote-nbsp y
  193. </dt>
  194. <dd> preserve nbsp as entities; do not convert to Unicode character 160
  195. </dd>
  196. <dt> --literal-attributes y
  197. </dt>
  198. <dd> do not alter whitespace chars in attributes
  199. </dd>
  200. <dt> --wrap-attributes n
  201. </dt>
  202. <dd> do not line-wrap attribute values
  203. </dd>
  204. <dt> --fix-url n
  205. </dt>
  206. <dd> do not escape invalid chars in uris
  207. </dd>
  208. <dt> --fix-backslash n
  209. </dt>
  210. <dd> do not change \ to / in URLs
  211. </dd>
  212. <dt> --enclose-block-text y
  213. </dt>
  214. <dd> always enclose text in element with &lt;p&gt;
  215. </dd>
  216. <dt> -o ~{target}
  217. </dt>
  218. <dd> target file
  219. </dd>
  220. <dt> ~{source}
  221. </dt>
  222. <dd> source file
  223. </dd>
  224. </dl>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. <div id="mw-head" class="noprint">
  233. <div id="left-navigation">
  234. <div id="p-namespaces" class="vectorTabs">
  235. <h3>Namespaces</h3>
  236. <ul>
  237. <li id="ca-nstab-main" class="selected"><span><a id="ca-nstab-main-href" href="index.html">Page</a></span></li>
  238. </ul>
  239. </div>
  240. </div>
  241. </div>
  242. <div id='mw-panel' class='noprint'>
  243. <div id='p-logo'>
  244. <a style="background-image: url(https://gnosygnu.github.io/xowa/xowa_logo.png);" href="http://xowa.org/" title="Visit the main page"></a>
  245. </div>
  246. <div class="portal" id='xowa-portal-home'>
  247. <h3>XOWA</h3>
  248. <div class="body">
  249. <ul>
  250. <li><a href="http://xowa.org/index.html" title='Visit the main page'>Main page</a></li>
  251. <li><a href="http://xowa.org/screenshots.html" title='See screenshots of XOWA'>Screenshots</a></li>
  252. <li><a href="https://www.youtube.com/watch?v=q0qbXYXEH6M" title="See a video of XOWA Desktop in action">Video</a></li>
  253. <li><a href="http://xowa.org/home/wiki/Help/Download_XOWA.html" title='Download the XOWA application'>Download XOWA</a></li>
  254. <li><a href="http://xowa.org/home/wiki/Dashboard/Image_databases.html" title='Download offline wikis and image databases'>Download wikis</a></li>
  255. </ul>
  256. </div>
  257. </div>
  258. <div class="portal" id='xowa-portal-started'>
  259. <h3>Getting started</h3>
  260. <div class="body">
  261. <ul>
  262. <li><a href="http://xowa.org/home/wiki/App/Setup/System_requirements.html" title='Get XOWA&apos;s system requirements'>Requirements</a></li>
  263. <li><a href="http://xowa.org/home/wiki/App/Setup/Installation.html" title='Get instructions for installing XOWA'>Installation</a></li>
  264. <li><a href="http://xowa.org/home/wiki/App/Import/Simple_Wikipedia.html" title='Learn how to set up Simple Wikipedia'>Simple Wikipedia</a></li>
  265. <li><a href="http://xowa.org/home/wiki/App/Import/English_Wikipedia.html" title='Learn how to set up English Wikipedia'>English Wikipedia</a></li>
  266. <li><a href="http://xowa.org/home/wiki/App/Import/Other_wikis.html" title='Learn how to set up other Wikipedias'>Other Wikipedias</a></li>
  267. </ul>
  268. </div>
  269. </div>
  270. <div class="portal" id='xowa-portal-android'>
  271. <h3>Android</h3>
  272. <div class="body">
  273. <ul>
  274. <li><a href="http://xowa.org/home/wiki/Android/Setup.html" title='Setup XOWA on your Android device'>Setup</a></li>
  275. <li><a href="https://www.youtube.com/watch?v=jsMTBxGweUw" title="See a video of XOWA Android in action">Video</a></li>
  276. </ul>
  277. </div>
  278. </div>
  279. <div class="portal" id='xowa-portal-help'>
  280. <h3>Help</h3>
  281. <div class="body">
  282. <ul>
  283. <li><a href="http://xowa.org/home/wiki/Help/About.html" title='Get more information about XOWA'>About</a></li>
  284. <li><a href="http://xowa.org/home/wiki/Help/Contents.html" title='View a list of help topics'>Contents</a></li>
  285. <li><a href="http://xowa.org/home/wiki/Help/Media.html" title='Read what others have written about XOWA'>Media</a></li>
  286. <li><a href="http://xowa.org/home/wiki/Help/Feedback.html" title='Questions? Comments? Leave feedback for XOWA'>Feedback</a></li>
  287. </ul>
  288. </div>
  289. </div>
  290. <div class="portal" id='xowa-portal-blog'>
  291. <h3>Blog</h3>
  292. <div class="body">
  293. <ul>
  294. <li><a href="http://xowa.org/home/wiki/Blog.html" title='Follow XOWA''s development process'>Current</a></li>
  295. </ul>
  296. </div>
  297. </div>
  298. <div class="portal" id='xowa-portal-links'>
  299. <h3>Links</h3>
  300. <div class="body">
  301. <ul>
  302. <li><a href="http://dumps.wikimedia.org/backup-index.html" title="Get wiki datababase dumps directly from Wikimedia">Wikimedia dumps</a></li>
  303. <li><a href="https://archive.org/search.php?query=xowa" title="Search archive.org for XOWA files">XOWA @ archive.org</a></li>
  304. <li><a href="http://en.wikipedia.org" title="Visit Wikipedia (and compare to XOWA!)">English Wikipedia</a></li>
  305. </ul>
  306. </div>
  307. </div>
  308. <div class="portal" id='xowa-portal-donate'>
  309. <h3>Donate</h3>
  310. <div class="body">
  311. <ul>
  312. <li><a href="https://archive.org/donate/index.php" title="Support archive.org!">archive.org</a></li><!-- listed first due to recent fire damages: http://blog.archive.org/2013/11/06/scanning-center-fire-please-help-rebuild/ -->
  313. <li><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector" title="Support Wikipedia!">Wikipedia</a></li>
  314. <li><a href="http://xowa.org/home/wiki/Help/Donate.html" title="Support XOWA!">XOWA</a></li>
  315. </ul>
  316. </div>
  317. </div>
  318. </div>
  319. </body>
  320. </html>