Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse links in LSP comments #118

Open
Umcaruje opened this issue Dec 8, 2014 · 1 comment
Open

Parse links in LSP comments #118

Umcaruje opened this issue Dec 8, 2014 · 1 comment

Comments

@Umcaruje
Copy link
Member

Umcaruje commented Dec 8, 2014

Since we already parse links in the descrpitions, it'd be really nice if links inside comments are parsed too.

Now its really hard to follow a link like this:
hard to follow

The preg_replace code for links can surely be reused, but it should look like this

$message = preg_replace('#\b((https?://)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.])+)#i', '<a href="$1" target="_blank">$1</a>', $message);

rather than this

$message = preg_replace('#([^"])\b((https?://)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.])+)#i', '$1<a href="$2" target="_blank">$2</a>', $message);

Because there are no iframes in the comments so the 'don't parse if there is an " before the link' hack isn't needed.

@tresf
Copy link
Member

tresf commented Dec 8, 2014

Yeah, we have to be careful not to parse embed links. But I still don't know if this is a good idea.... Many commenting systems don't permit links to prevent spamming. Perhaps we only permit links back to lmms.io?

-Tres

@Umcaruje Umcaruje added the lsp label Apr 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants