Forward to mobile-l, forget to press "answer all" :)
-----Ursprüngliche Nachricht----- Von: Florian Schmidt [mailto:florian.schmidt.welzow@t-online.de] Gesendet: Montag, 8. Dezember 2014 20:46 An: 'Dan Garry' Betreff: AW: [WikimediaMobile] CommonsMetadata API returning HTML?
First: That looks great! Maybe a good input for mobile web, too :)
I remember a similar problem for mobile media viewer (you see the author of an image, too, if returned by commonsmeta api). The problem is, iirc, that the html is in the input (the template used on commons to describe images where the information is extracted from), so CommonsMeta has to strip the html out, like the app do it locally. I don't know, what would be the best way :/
Kind regards / Freundliche Grüße Florian
Von: mobile-l-bounces@lists.wikimedia.org [mailto:mobile-l-bounces@lists.wikimedia.org] Im Auftrag von Dan Garry Gesendet: Montag, 8. Dezember 2014 20:31 An: Multimedia@lists.wikimedia.org; mobile-l Betreff: Re: [WikimediaMobile] CommonsMetadata API returning HTML?
Sorry, the example query I provided was incorrect. Use this instead: https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&forma...
Thanks, Dan
On 8 December 2014 at 11:29, Dan Garry dgarry@wikimedia.org wrote: Greetings, Multimedia Team!
Background: The Mobile Apps Team is working on a restyling of the way content the first fold of content is presented in the Wikipedia app. You can see this image to see what this looks like. Having a high-resolution image so prominently at the top of the page will likely drive a lot of clicks, so we're working on a lightweight image viewer to deal with file pages, which are poorly styled monstrosities on the mobile app. We're going to use the CommonsMetadata API to help us out. :-)
Problem: The CommonsMetadata API can sometimes return HTML [1]. Having HTML in the API response is a bit problematic for us. Native apps make next to no use of HTML when creating links or layouts, so we have to strip the HTML from every API response, lest it be displayed as plaintext to the user. In the short term this is fine, we can strip it and throw the information away. But in the long run it'd be better if the API didn't return HTML.
Our ask: Can the CommonsMetadata API please not return HTML in its responses? :-)
Thanks, Dan
[1]: Run this query, and look at "artist" key. The API response has an HTML link in it.