On 05/17/2014 05:57 PM, Subramanya Sastry wrote: > On 05/17/2014 10:51 AM, Subramanya Sastry wrote: >> So, going back to your original implementation, here are at least 3 ways I >> see this working: >> >> 2. action=expandtemplates returns a <html>...</html> for the expansion of >> {{T}}, but also provides an additional API response header that tells >> Parsoid that T was a special content model page and that the raw HTML that >> it received should not be sanitized. > > Actually, the <html></html> wrapper is not even required here since the new > API response header (for example, X-Content-Model: HTML) is sufficient to > know what to do with the response body.
Indeed. Also, instead of the header we can just set a property / attribute in the JSON/XML response structure. This will also work for multi-part responses, for example when calling action=expandtemplates on multiple titles. Gabriel _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l