Last modified: 2012-04-16 09:16:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29630, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27630 - action=parse&pageid=n seems to not be parsing correctly in some cases
action=parse&pageid=n seems to not be parsing correctly in some cases
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Roan Kattouw
http://en.wikipedia.org/w/api.php?act...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-22 11:57 UTC by tristen
Modified: 2012-04-16 09:16 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description tristen 2011-02-22 11:57:15 UTC
This URL:

http://en.wikipedia.org/w/api.php?action=parse&pageid=3209758

yields a page with a snippet of html looking like this:

&amp;lt;a href=&amp;quot;<a href="http://toolserver.org/~geohack/geohack.php?pagename=St_James_Old_Cathedral&amp;amp;amp;params=37_42_26_S_144_56_17.9_E_&amp;quot;">http://toolserver.org/~geohack/geohack.php?pagename=St_James_Old_Cathedral&amp;amp;amp;params=37_42_26_S_144_56_17.9_E_&amp;quot;</a> class=&amp;quot;external text&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;

which winds up looking somewhat like this:

<a href="<a href="http://toolserver.org/~geohack/geohack.php?pagename=St_James_Old_Cathedral&params=37_42_26_S_144_56_17.9_E_"">http://toolserver.org/~geohack/geohack.php?pagename=St_James_Old_Cathedral&params=37_42_26_S_144_56_17.9_E_"</a> class="external text" rel="nofollow">

you can reproduce it quite easily with the url:

http://en.wikipedia.org/w/api.php?action=parse&pageid=3209758

and by viewing the source on the original page helps see how the html should look:

http://en.wikipedia.org/wiki/St_James_Old_Cathedral

sorry in advance in case i've made a mistake and i'm not interpreting the html correctly.

sorry in advance also if major is an exaggeration of the severity!

best regards and thank you for the API.

tristen
Comment 1 Sam Reed (reedy) 2011-02-22 13:20:41 UTC
To me that looks perfectly sane, and correct...

What do you think is wrong?
Comment 2 Roan Kattouw 2011-02-22 13:27:03 UTC
I'm getting this:

&lt;a href=&quot;http://toolserver.org/~geohack/geohack.php?pagename=St_James_Old_Cathedral&amp;amp;params=37_42_26_S_144_56_17.9_E_&quot; class=&quot;external text&quot; rel=&quot;nofollow&quot;&gt; which looks good to me. If the API would output what you said it did, that'd be wrong.

What did you use for the &format= parameter?
Comment 3 tristen 2011-02-22 14:20:40 UTC
i didn't use a format= parameter, therefore i suppose it was using the default of xmlfm. when i explicitly use format=xml it appears ok.

that's a solution, i'm happy with that! sorry to take your time.
Comment 4 Sam Reed (reedy) 2011-02-22 14:31:56 UTC
The fm means html pretty printing for all of them...

And it is default
Comment 5 Roan Kattouw 2011-02-22 19:24:18 UTC
(In reply to comment #4)
> The fm means html pretty printing for all of them...
> 
> And it is default
To clarify: the default format is xmlfm, which is XML with HTML pretty-printing. It's designed to be human-readable, not necessarily machine-readable. For actual XML, use format=xml

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links