Roan Kattouw wrote: > Manos Batsis schreef: >> Hello, >> >> Wiki fragments returned by the API (in JSON or XML) format contain HTML >> markup. When converting the wiki markup to XHTML, is it safe to *not* >> escape characters '<' and '>'? Does that apply to other characters, i.e. >> all five predefined XML entities or more?
> Wikitext can contain HTML markup, but that does NOT mean it's safe. The > only thing you can safely not escape is the output of action=parse, > which is valid and safe XHTML. Wikitext can quite literally contain > *anything*. I'm working on a client side app and the main issue is browsers only let me use JSON (through <script>) and thought my only option was to write javascript code to convert wikmarkup to XHTML. However, i just saw action=parse also has a "page" parameter i can use along with "format=json" to get XHTML markup wrapped in JSON, which is probably what I need. Thanks! Manos _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
