Page MenuHomePhabricator

API page export and revision queries strip newlines from page content in Chrome
Closed, InvalidPublic

Description

Author: alj62888

Description:
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


Version: 1.20.x
Severity: major
OS: Linux

Details

Reference
bz45218

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:13 AM
bzimport set Reference to bz45218.
bzimport added a subscriber: Unknown Object (MLST).

alj62888 wrote:

My apologies, Chrome was removing them; had to view source to see them.

Glad you found out the reason (and thanks for sharing it here for the next person running into the same problem!)