Bug 61298: Avoid need for cloning when using PHP preprocessor
Template parameters were processed asynchronously even when using the PHP
preprocessor. This is however not necessary, as all template parameters
encountered in that situation are undefined.
External link contents are parsed all the way to DOM to avoid them breaking up
the link. This includes sanitization, which destructively updates the tokens
(removes attributes). Combined with asynchronous parameter processing this
lead to the crash observed in bug 61298.
Co-authored-by: Arlo Breault <firstname.lastname@example.org>
Co-authored-by: Gabriel Wicke <email@example.com>