Revision 903,
678 bytes
checked in by niltonneto, 15 years ago
(diff) |
Importacao inicial do Expresso do Serpro
|
Line | |
---|
1 | kses whitelisted URL protocols |
---|
2 | ============================== |
---|
3 | |
---|
4 | From kses 0.2.0, it has a function that checks all attribute values for URL |
---|
5 | protocols and only allows the protocols given in a whitelist. |
---|
6 | |
---|
7 | If you call kses the old way with two parameters - a string and an |
---|
8 | $allowed_html array - it will take its own default array, which whitelists the |
---|
9 | protocols http, https, ftp, news, nntp, telnet, gopher and mailto. Pretty |
---|
10 | reasonable, but anyone who wants to change it just calls the kses() function |
---|
11 | with a third parameter, like this: |
---|
12 | |
---|
13 | $string = kses($string, $allowed_html, array('http', 'https')); |
---|
14 | |
---|
15 | Note that you shouldn't include any colon after http or other protocol names. |
---|
Note: See
TracBrowser
for help on using the repository browser.