# Options/HTML Tidy

From XOWA: the free, open-source, offline wiki application

Apps (basic) | Apps (advanced) | Wiki | HTML | External apps | Modules | Extensions | Misc

- HTML
- Wiki HTML
- HTML Tidy

Save

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 Diagnostics/HTML_Tidy for examples.

For more info about XOWA's customized JTidy jar, see App/Xtn/Mediawiki/Tidy/JTidy

## General

Enabled: [1] |
Tidy engine: [2] |

## Engine: tidy binary

Linux / Mac OS X users:

- If you choose to use the tidy binary, please download the appropriate one for your platform from http://tidy.sourceforge.net/
- If you enable tidy and XOWA shows no HTML, you will need to disable tidy through a text editor: /xowa/user/anonymous/app/data/cfg/xowa_user_cfg.gfs

tidy library: [3] | [4]

## Notes

1. ^ Choose if HTML tidy is enabled (default is `checked`)
2. ^ Choose an HTML tidy engine (default is `jtidy`)
   - tidy: The same library that is used by WMF wikis. Choose `tidy` 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.
   - jtidy: A Java implementation of the tidy library. Choose `jtidy` 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%).
3. ^ Path to the tidy binary . Recommended: tidy
4. ^ XOWA defaults to the following tidy arguments:

       -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 "~{target}" "~{source}"

   -utf8
     default is ascii
   --force-output y
     always generate output; do not fail on error
   --quiet y
     suppress command-line header
   --tidy-mark n
     do not add tidy watermark
   --doctype ''''
     default is auto (TRANSITIONAL); causes weird quirks with short text lines on some wikis (tr.wikibooks.org)
   --wrap 0
     default is 80; do not limit lines to 80 chars
   --indent y
     indent block levels
   --quote-nbsp y
     preserve nbsp as entities; do not convert to Unicode character 160
   --literal-attributes y
     do not alter whitespace chars in attributes
   --wrap-attributes n
     do not line-wrap attribute values
   --fix-url n
     do not escape invalid chars in uris
   --fix-backslash n
     do not change \ to / in URLs
   --enclose-block-text y
     always enclose text in element with <p>
   -o ~{target}
     target file
   ~{source}
     source file

### XOWA

- Main page
- Screenshots
- Download XOWA
- Download wikis

### Getting started

- Requirements
- Installation
- Simple Wikipedia
- English Wikipedia
- Other Wikipedias

### Android

- Setup

### Help

- About
- Contents
- Media
- Feedback

### Blog

- Current

### Links

- Wikimedia dumps
- XOWA @ archive.org
- English Wikipedia

### Donate

- archive.org
- Wikipedia