Gajim - 2017-08-29


  1. baitisj lovetox: I enjoy writing regex ... does that mean I have a problem? 😯
  2. Link Mauve baitisj, please fix Gajim’s then. :)
  3. mimi89999 baitisj: That's great! Solve the URL issue
  4. mdosch I'm not into regex but it seems the IETF includes a regex here https://tools.ietf.org/html/rfc3986#page-50
  5. lovetox mdosch, thats for parsing a URI reference into its parts
  6. lovetox scheme, path, query, fragment etc
  7. lovetox to use this you first have to extract the URI out of the text :)
  8. Link Mauve Also, you generally don’t want to accept any valid URI, for example https://example.com/, is a valid URI, but you most likely want to stop before the comma, except if it’s followed by something which isn’t a space.
  9. Link Mauve You also probably want to count the number of open pairs of characters and stop parsing once you encounter one more closing one than open ones.
  10. baitisj Cool. I'll take a peek when I can 😝
  11. Link Mauve Such as in https://example.com/something(something(else)).html) for example.
  12. Link Mauve Great! \o/
  13. mimi89999 Erreur d’analyse XML : erreur de syntaxe Emplacement : https://example.com/something(something(else)).html) Numéro de ligne 1, Colonne 1 :<!doctype html> ^
  14. Link Mauve Wut?
  15. Link Mauve Was it caused in Gajim by my message?
  16. mimi89999 Link Mauve‎: I get that in FF
  17. Link Mauve mimi89999, this is just an example URL, there is no point in clicking on it.
  18. mimi89999 I know... Still clicked on it to check... Didn't expect that...
  19. wiktor > You also probably want to count the number of open pairs of characters and stop parsing once you encounter one more closing one than open ones. Regexp can't do counts
  20. Link Mauve wiktor, I know, that’s why I’m saying that.
  21. wiktor Wouldn't a simpler regexp suffice? Like "one pair or properly closed parens or none"? That covers most links from Wikipedia etc. And real world cases when a link like that is followed by a close paren from the surrounding text.