Newline in appendtext (action=edit)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Newline in appendtext (action=edit)

geoffreydebelie
Hi,

How do I include a newline at the start of "appendtext"? Do I use "\n"?

Kind regards,
Geoffrey De Belie

<script type="text/javascript">window.onbeforeunload = function() {}</script>


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Newline in appendtext (action=edit)

Bartosz Dziewoński
MediaWiki expects a literal newline (%0A when URL-encoded). How to
include one in a string depends on the programming language you're
accessing the API from.

--
Bartosz Dziewoński

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Newline in appendtext (action=edit)

geoffreydebelie
---- On wo, 01 feb 2017 15:33:51 +0100 Bartosz Dziewoński <[hidden email]> wrote ----

 > MediaWiki expects a literal newline (%0A when URL-encoded). How to
 > include one in a string depends on the programming language you're
 > accessing the API from.
  >

Thanks a lot :) I was using Bash and just making a multi line string worked (didn't know you could do that in Bash).

If you're interested in the code, it's here: https://github.com/Smile4ever/wikitools/tree/master/nocat

Kind regards,
Geoffrey De Belie


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api