Forward to mobile-l, forget to press "answer all" :) -----Ursprüngliche Nachricht----- Von: Florian Schmidt [mailto:florian.schmidt.wel...@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-boun...@lists.wikimedia.org [mailto:mobile-l-boun...@lists.wikimedia.org] Im Auftrag von Dan Garry Gesendet: Montag, 8. Dezember 2014 20:31 An: multime...@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&format=jsonfm&iiprop=extmetadata&iilimit=10&titles=File%3ACommon%20Kingfisher%20Alcedo%20atthis.jpg Thanks, Dan On 8 December 2014 at 11:29, Dan Garry <dga...@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. -- Dan Garry Associate Product Manager, Mobile Apps Wikimedia Foundation -- Dan Garry Associate Product Manager, Mobile Apps Wikimedia Foundation _______________________________________________ Mobile-l mailing list Mobile-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mobile-l