Last modified: 2011-04-03 17:10:42 UTC
It can be nice to get the html for the input text. Thanks.
That's what action=parse is for.
this bug was for getting the html along with the expand template text or generate xml, but it is no problem to call also action=parse. Alternativ it is possible to query prop=revisions (for existing pages)
I'm not quite sure if this is invalid. It would be nice in some cases if the extension "ExpandTemplates" had the option to output into HTML rather than outputting the (somewhat final) wikitext. Perhaps this bug needs to be refocused? If you built the option into the extension, the API module could then follow with its own option to provide the parsed wikitext (which would just be a wrapper for action=parse, yes). This should probably be poked at a bit more, so re-opening for now.
(In reply to comment #3) > I'm not quite sure if this is invalid. It would be nice in some cases if the > extension "ExpandTemplates" had the option to output into HTML rather than > outputting the (somewhat final) wikitext. Perhaps this bug needs to be > refocused? If you built the option into the extension, the API module could > then follow with its own option to provide the parsed wikitext (which would > just be a wrapper for action=parse, yes). This should probably be poked at a > bit more, so re-opening for now. action=expandtemplates is not an extension, it's in core. Special:ExpandTemplates is an extension, yes. The API has expanding to wikitext and parsing to HTML both built into core. If you want Special:Expandtemplates to be able to parse to HTML, that's not an API bug (not even a core bug, since it's an extension). Your comment confuses me and I don't understand what you want exactly, so I'm reclosing this bug. Please state what you want more clearly and either reopen this bug (if it's an API change) or file a new one (if it's a change to something else).
(In reply to comment #4) > action=expandtemplates is not an extension, it's in core. Oh, that's confusing. I thought we were talking about the API module for the extension. Okay, that makes more sense now. (Though, really, the API module is pretty much the identical functionality of the extension, it's just in core.) > Your comment confuses me and I don't understand what you want exactly, so I'm > reclosing this bug. Please state what you want more clearly and either reopen > this bug (if it's an API change) or file a new one (if it's a change to > something else). The original request was for an option to expand page content directly into HTML from action=expandtemplates (and actually, it looks like the subsequent comment wanted to get the XML, wikitext, and/or HTML all at once, simultaneously). You're suggesting using the parse module instead. Your solution requires an extra request, but it's probably the more sane approach. I know personally when I've used the Special:ExpandTemplates extension UI, it would've been helpful to be able to get the output in HTML rather than in wikitext, but for developers/programmers, the overhead of an extra API request probably isn't high enough to warrant adding an option to the expandtemplates module.