Potential bug: Pasting code gives error about having too many links
- 6 replies
- 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?"
- KajMagnus @KajMagnus2020-06-16 07:39:20.810Z
Related issue: Issue with formatting of code when using the upsert API — Markdown formatting was ignored, when using the Upsert API.
I wonder if maybe that was what happened here.
(since I couldn't reproduce, but for Jon it happened consistently, which would have been the case, if he was posting via the Upsert API)