HomePhabricator

Use HHVM+EZC internal tidy

Authored by tstarling.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Use HHVM+EZC internal tidy

EZC doesn't currently support direct access to object properties via the
obj->std.properties hashtable, but tidy uses this extensively. But it
turns out that for production use cases, tidy_repair_string() should be
sufficient. $wgDebugTidy and $wgValidateAllHtml are not used, and
no deployed extension calls MWTidy::checkErrors().

The only difference I know of is that errors from tidy (status==2) lead
to the tidy output being used, rather than discarded. But
TY_(ReportFatal) has very few callers in tidylib -- probably none that
are reachable from stripped parser output.

So, throw an exception if MWTidy::checkErrors() is requested on an HHVM
instance with the tidy extension. For MWTidy::tidy(), use
tidy_repair_string(). Refactor some relevant code.

Bug: T758
Change-Id: I8d5b1c2c9f9ddce46d8ad099a671a2e297d256e0
(cherry picked from commit e6fdbfec472ec12655805089492e51bf6d29f86e)
(cherry picked from commit rMW565290e530ac)

Details

Committed
oriNov 28 2014, 11:11 PM
ChangeId
I8d5b1c2c9f9ddce46d8ad099a671a2e297d256e0

Commit No Longer Exists

This commit no longer exists in the repository.