On Tue, Jan 4, 2011 at 8:09 PM, Roan Kattouw <roan.katt...@gmail.com> wrote: > 2011/1/4 Marc Kerbiquet <mkerbiq...@gmail.com>: >> Hi, >> >> Is there an option to get absolute URLs with action=parse ? >> >> For instance, I would like to get "http://en.wikipedia.org/wiki/..." >> instead of "/wiki/..." in src and href attributes. I can parse the HTML >> returned by the API and transform URLs, but I wonder if there is an >> easier method. >> > action=render does this: > > http://en.wikipedia.org/w/index.php?title=Albert_Einstein&action=render > > Having it in action=parse would be nice, but because of the way this > stuff is written (checking whether the action parameter equals > 'render' and adding it if so) that's probably tricky. > > Roan Kattouw (Catrope) >
Thanks, but I forgot to mention that I also use the 'text' attribute and the headhtml prop in a POST with action=parse. I use this command to implement a preview in an external editor (the text is not in the database yet). It would be nice if it was possible to implement an option to get absolute urls but a simple replace does the trick as long as the page does not contain source HTML :-) Cheers, Marc _______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api