Hello,
I'm trying to learn how to convert MediaWiki markup to HTML. One of the ways I've figured out is by sending a query to api.php:
http://en.wikipedia.org/w/api.php?action=parse&text=%7B%7BProject:Sandbo...
After parsing response which I get is all special characters in HTML are kind of escaped. For e.g. < is <
So <a> becomes
<a>
Is there any way to disable this feature ?
Regards, Siteshwar Vashisht
On Fri, Feb 25, 2011 at 12:18 PM, S Vashisht situ117@yahoo.com wrote:
So <a> becomes
<a>
Is there any way to disable this feature ?
That's what XML is, any proper XML parser should handle this for you.
2011/2/25 OQ overlordq@gmail.com
On Fri, Feb 25, 2011 at 12:18 PM, S Vashisht situ117@yahoo.com wrote:
So <a> becomes
<a>
Is there any way to disable this feature ?
That's what XML is, any proper XML parser should handle this for you.
Not all special characters: only four characters, <,>,& and " (< > & "), so if you manage to do a few of string replaces you'll get your resutl easily.
Alex
S Vashisht wrote:
Hello,
I'm trying to learn how to convert MediaWiki markup to HTML. One of the ways I've figured out is by sending a query to api.php:
http://en.wikipedia.org/w/api.php?action=parse&text=%7B%7BProject:Sandbo...
After parsing response which I get is all special characters in HTML are kind of escaped. For e.g. < is <
So <a> becomes
<a>
Is there any way to disable this feature ?
Regards, Siteshwar Vashisht
When you get the results in XML format, those characters need to be escaped. Add a &format= parameter for a different one (with different escapings).
Hello,
What characters will be escaped when I use:
format=json
Regards, Siteshwar Vashisht
--- On Fri, 25/2/11, Platonides platonides@gmail.com wrote:
From: Platonides platonides@gmail.com Subject: Re: [Mediawiki-api] Parsing MediaWiki markup to HTML To: "MediaWiki API announcements & discussion" mediawiki-api@lists.wikimedia.org Date: Friday, 25 February, 2011, 10:30 PM
S Vashisht wrote:
Hello,
I'm trying to learn how to convert MediaWiki markup to HTML. One of the ways I've figured out is by sending a query to api.php:
http://en.wikipedia.org/w/api.php?action=parse&text=%7B%7BProject:Sandbo...
After parsing response which I get is all special characters in HTML are kind of escaped. For e.g. < is <
So <a> becomes
<a>
Is there any way to disable this feature ?
Regards, Siteshwar Vashisht
When you get the results in XML format, those characters need to be escaped. Add a &format= parameter for a different one (with different escapings).
_______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
On 25 February 2011 22:25, S Vashisht situ117@yahoo.com wrote:
Hello,
What characters will be escaped when I use:
format=json
Your program should not need to know — just use a JSON parser. If you really don't like using libraries, then the JSON spec is at http://json.org/.
Conrad
mediawiki-api@lists.wikimedia.org