Render view error output as HTML instead of wikitext#1076
Draft
malberts wants to merge 1 commit into
Draft
Conversation
The {{#view}} error box was returned as a bare parser-function string, which
MediaWiki treats as wikitext. When an error message interpolates the offending
user-supplied argument and that argument holds a URL, the parser autolinks it:
the URL is wrapped in an anchor, and a trailing quote is swallowed into the link
and percent-encoded, corrupting the surrounding markup.
Wrap the error output in the same isHTML/noparse array the success placeholder
and cypher_raw already use, so the parser leaves it alone. The wrapping happens
at the handle() boundary rather than inside renderError(): the internal
parseArgs()/classifyArgs() plumbing distinguishes an error string from a parsed
argument tuple by type, so an armoured array there would be indistinguishable
from the tuple.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
malberts
force-pushed
the
fix/view-error-autolink
branch
from
July 17, 2026 18:48
ab62860 to
1df8183
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows-up to #1069.
The
{{#view}}error box was returned as a bare parser-function string, which MediaWiki treats as wikitext. When an error message interpolates the offending user-supplied argument and that argument holds a URL, the parser autolinks it: the URL is wrapped in an anchor, and a trailing quote is swallowed into the link and percent-encoded, corrupting the surrounding markup.Wrap the error output in the same
isHTML/noparsearray the success placeholder andcypher_rawalready use, so the parser leaves it alone. The wrapping happens at thehandle()boundary rather than insiderenderError(): the internalparseArgs()/classifyArgs()plumbing distinguishes an error string from a parsed argument tuple by type, so an armoured array there would be indistinguishable from the tuple.Production notes
Spec and review by
Fable 5 (max); implementation and tests by anOpus 4.8 (max)subagent. Browser verification was automated (Playwright) against the bundled demo data, not human-clicked.