No internet connection
  1. Home
  2. Support

Potential bug: Pasting code gives error about having too many links

By Christian Scheuer @chrscheuer2020-01-06 19:04:01.332Z

Hi @KajMagnus

See Jon's input here:
https://forum.soundflow.org/-1463#post-4

He can't paste code to our forum. Do you have any idea why it would think that these are links?
He also tried pasting the code inside ``` lines to no avail.

  • 2 replies
  1. KajMagnus @KajMagnus2020-01-08 16:19:50.345Z

    Ok that's an anti spam thing. Apparently it's too restrictive (at least in this case). I'll look into this tomorrow

    1. Progress
    2. KajMagnus @KajMagnus2020-01-25 13:21:44.669Z2020-01-25 14:31:33.923Z

      I looked into this now. Sorry it took a while.

      I cannot reproduce. When I add ``` backticks, link looking things and <a href=...> etc won't get converted to links, and I can submit "lots of" links, no problem (when that number of links is otherwise disallowed).

      I'm wondering if this is instead a UX problem. When your user, Jon, attempted to add the ``` backticks, I'm guessing he did that in the wrong way somehow, maybe added the ``` on the wrong line or only two ticks or something.

      Anwyay, it's not so user friendly, by Talkyard, to require people to know about backticks ```, or require them to remove some links.

      Maybe Talkyard can instead simply just not convert all link looking things to real <a href=.... links. Only the first 5 links, if it's a new user, and maybe the first 20 if s/he is a basic / full member. (Because what happened in Jon's case, was that lots of not-actually-links source code words got converted to links, by Linkify-it, resulting in too many links.) — Remaining links, could stay plain text instead, no html markup added.

      At the same time, maybe this isn't a good way to mitigate spam, at all. Hmm. But Talkyard checks links with external services like Google Safe Browsing API, and if new users can post 999 links, then maybe Talkyard would exceed some rate limits. — Probably some max number of links is a good idea. Hmm

      Edit: Now I posted a thought about this, over at the Linkify-It forum: https://github.com/markdown-it/linkify-it/issues/84 "What about a setting: Max num links to linkify?"