Add love.system.openURL

Issue #863 resolved
Martin Felis
created an issue

It was suggested in the issue tracker of the android port that opening URLs via the browser would be great, e.g. for twitter links, home page of the game.

The API could look like this: love.system.browser("")

What do you think?

edit: use love.system.openURL("") instead

Comments (16)

  1. Anders Ruud repo owner

    It's easy to see that love.system.browser is the wrong name when you have to parenthetically clarify what it does in the title.

    love.system.openURL, maybe.

  2. Anders Ruud repo owner

    I don't think there are any new security concerns. (You can already do much worse stuff with LuaSocket and the rest of the APIs).

    Even though this is probably possible with os.execute, I think it would be nicer to have a special function for doing this, so I support it. :)

  3. Martin Felis reporter

    A concern could be that it could allow an "attacker" to start many programs an therefore create some kind of DoS. However this is also possible with the default Lua os.execute so I don't see a problem here.

    (Appart from that an "attacker" can already send a whole Rick Astley album to the soundcard...)

  4. Pablo Mayobre

    I think that exposing os and io from lua makes love something not secure at all, so it's not really a big deal. (Also if you want to create a virus you wouldn't do it in love anyway... right?).

    Not normalized URLs would be great, in android you can open a google play url and it will open google play instead. This is just an example (github has github for windows/mac URLs, etc)

  5. Log in to comment