Page 1 of 1

Allowed URL protocols

Posted: Thu Aug 04, 2016 9:51 am
by Profo
I'm having trouble trying to add any custom BBcode which includes non-standard protocols (ssh, svn+ssh, svn...). I am using {URL} token.

An example to clarify follows.

BBCode usage:

Code: Select all

[protocol={URL}]{SIMPLETEXT}[/protocol]
HTML replacement:

Code: Select all

<a href="{URL}">{SIMPLETEXT}</a>
The above does not work. Any custom combination I try fails, it just renders as plain text. The same happens if you paste the url directly (no BBCode) inside any post, so I guess any protocols different from HTTP or HTTPS are being filtered.

Is there a configuration parameter/file I can change to allow specific protocols in URLs and make them clickable inside posts?

Re: Allowed URL protocols

Posted: Thu Aug 04, 2016 9:58 am
by Mick
What are you trying to achieve exactly, what is the purpose of the BBCode?

Re: Allowed URL protocols

Posted: Thu Aug 04, 2016 10:23 am
by Profo
I'm trying to make any non-http URLs (skype, git, irc, udp, ssh, svn ...) clickable, either using BBCode or not.

In version 3.1, it works fine. e.g. ssh://path/to/files is clickable in 3.1 posts, but not in 3.2.

Re: Allowed URL protocols

Posted: Fri Aug 05, 2016 1:52 am
by JoshyPHP
Profo wrote:Is there a configuration parameter/file I can change to allow specific protocols in URLs and make them clickable inside posts?
There's a config setting but I don't think there's a way to change it from the admin panel. You can change it in CLI or I guess you can modify your config table by hand too. You'll have to purge the cache in the admin panel for the changes to take effect.

Code: Select all

./phpBB/bin/phpbbcli.php config:set allowed_schemes_links http,https,ftp,ftps,svn+ssh

Re: Allowed URL protocols

Posted: Fri Aug 05, 2016 4:54 am
by Profo
That's exactly what I was looking for. Thanks JoshyPHP!