Last modified: 2009-12-24 19:34:00 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 T23945, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21945 - Missing chomp control for YAML literals
Missing chomp control for YAML literals
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
http://de.wikipedia.org/w/api.php?act...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-24 18:02 UTC by Bjoern Hoehrmann
Modified: 2009-12-24 19:34 UTC (History)
4 users (show)

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


Attachments

Description Bjoern Hoehrmann 2009-12-24 18:02:57 UTC
The API output for the cited URL goes like this:

query:
  general:
    mainpage: |
      Wikipedia:Hauptseite
    base: |
      http://de.wikipedia.org/wiki/Wikipedia:Hauptseite
    sitename: Wikipedia
    generator: MediaWiki 1.16alpha-wmf
    phpversion: 5.2.4-2ubuntu5.7wm1
    phpsapi: apache2handler
    dbtype: mysql
    dbversion: 5.1.33-log
    rev: 59858
    case: first-letter
    rights: >
      Creative Commons Attribution-Share Alike
      3.0 Unported
    lang: de

For the "base" and "rights" properties (and others like it) this causes the trailing new line to be included in the property value (so you get "http://de.wikipedia.org/wiki/Wikipedia:Hauptseite\n"). This should instead use the "strip" chomp control ("-"), like so:

query:
  general:
    mainpage: |-
      Wikipedia:Hauptseite
    base: |-
      http://de.wikipedia.org/wiki/Wikipedia:Hauptseite
    sitename: Wikipedia
    generator: MediaWiki 1.16alpha-wmf
    phpversion: 5.2.4-2ubuntu5.7wm1
    phpsapi: apache2handler
    dbtype: mysql
    dbversion: 5.1.33-log
    rev: 59858
    case: first-letter
    rights: >-
      Creative Commons Attribution-Share Alike
      3.0 Unported
    lang: de

See http://yaml.org/spec/1.0/#c-chomp-control for details.
Comment 1 Roan Kattouw 2009-12-24 19:34:00 UTC
Fixed in r60367.

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


Navigation
Links