- 3.6. Function reference
3.6.17. isUrl() - 3.6.16. isImage()
« Previous - 3.6.18. lower()
Next »
3.6.17. isUrl()
| Reference | boolean isUrl(string $text) |
|---|
Returns true, if the $text is a valid URL. The code below shows, how to use this function to make the user name an URL to his website in case he defined its address in the profile.
<a parse:href="$user.www" opt:on="isUrl($user.www)">{$user.nickname}</p>
The function does not accept malformed URL-s or URL parts, for example with removed protocol that are usually accepted by the current browsers. In other words, the string
www.example.comis not accepted as a valid URL, buthttp://www.example.com- is.
- 3.6.17. isUrl()
3.6. Function reference - « Previous
3.6.16. isImage() - Next »
3.6.18. lower()