Author: bjoern
Description:
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: deFor 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: deSee http://yaml.org/spec/1.0/#c-chomp-control for details.
Version: unspecified
Severity: normal
URL: http://de.wikipedia.org/w/api.php?action=query&meta=siteinfo&format=yamlfm