Last modified: 2014-02-12 23:32:42 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 T47218, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45218 - API page export and revision queries strip newlines from page content in Chrome
API page export and revision queries strip newlines from page content in Chrome
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.20.x
All Linux
: Unprioritized major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-21 04:01 UTC by Al Johnson
Modified: 2014-02-12 23:32 UTC (History)
7 users (show)

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


Attachments

Description Al Johnson 2013-02-21 04:01:58 UTC
I'm issuing this request:

?action=query&export=&exportnowrap&titles=SusData:testpage&redirects=

and the content of element <mediawiki><page><revision><text> is all one long line.

I also tried it by getting a revision with the following:

?action=query&prop=revisions&rvprop=content&rvlimit=1&titles=SusData:testpage&redirects=&format=xml

Newlines are preserved with format=xmlfm, but, NOT with format=xml.  Using xmlfm would require two parsings of the output, one for HTML and a second for XML.

I don't know of a workaround, but would like to know if there is one.

Thanks,
al
Comment 1 Betacommand 2013-02-21 04:09:35 UTC
New lines are represented by \n
Comment 2 Al Johnson 2013-02-21 04:17:46 UTC
My apologies, Chrome was removing them; had to view source to see them.
Comment 3 Andre Klapper 2013-02-21 13:58:09 UTC
Glad you found out the reason (and thanks for sharing it here for the next person running into the same problem!)

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


Navigation
Links