The
{URL}
token is different from 3.1. Its definition is:
In s9e\TextFormatter, protocols have to be whitelisted so the part about using "any protocol" is a lie. I'd like to add an interface for the admin to configure which protocols are allowed but adding anything to the ACP takes so much code. I'm thinking about adding the list of allowed protocols as a text input in acp_board with a default value of3.1 wrote:A valid URL using any protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, “http://” is prefixed to the string.
http,https,ftp
.What's this about adding "http://"? It's not currently in 3.2. Is it worth adding now or should it be scrapped altogether?
There's a bunch of new tokens in 3.2. I think that trying to list them all in acp_bbcodes would confuse users more than it would help them though.
New phpBB-specific tokens that were added to support the default BBCodes
- FLASHHEIGHT accepts a number between 0 and max_img_height.
- FLASHWIDTH accepts a number between 0 and max_img_width.
- FONTSIZE accepts a number between 1 and max_font_size.
- IMAGEURL accepts a URL and checks it against max_img_height/max_img_width.
- ALNUM accepts anything that matches
/^[0-9A-Za-z]+$/D
. - HASHMAP maps strings to their replacement in the form
{HASHMAP=string1:replacement1,string2:replacement2}
. Case-sensitive. Preserves unknown values by default. It's used for thelist
BBCode to map1
todecimal
and so on, so forth. - IP, IPPORT, IPV4 and IPV6 validates their value using ext/filter's FILTER_VALIDATE_IP.
- INT validates its value using ext/filter's FILTER_VALIDATE_INT.
- MAP is similar to HASHMAP except that it is case-insensitive by default.[/c]
- RANGE accepts an integer between given range, e.g.
{RANGE=-10,42}
- REGEXP validates its value against given regexp, e.g.
{REGEXP=/^foo\w+bar$/}
- UINT validates its value using ext/filter's FILTER_VALIDATE_INT, must be 0 or greater.
Default filters: https://github.com/s9e/TextFormatter/bl ... Filters.mdCustom BBCode syntax: https://github.com/s9e/TextFormatter/bl ... eMonkey.md
- Default filters: http://s9etextformatter.readthedocs.org ... n_filters/
- Custom BBCode syntax: http://s9etextformatter.readthedocs.org ... de_syntax/