# Options/HTML Tidy

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

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

Choose if HTML tidy is enabled

Tidy engine

Choose an HTML tidy engine:

- 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%).

## Tidy binary

Process

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
- Video
- Download XOWA
- Download wikis

### Getting started

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

### Android

- Setup
- Video

### Help

- About
- Contents
- Media
- Feedback

### Blog

- Current

### Links

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

### Donate

- archive.org
- Wikipedia
- XOWA