Jump to content

Search the Community

Showing results for tags 'sanitize'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. Hi all, I have a problem for sanitizing / validating a web address input. My personal favor is doing it with regex. I made a simple example with preg_replace <?php if (!empty($_POST['wbddrss']) ) { $wbddrss = $_POST['wbddrss']; $wbddrss = trim($wbddrss); var_dump($wbddrss); $validate = preg_replace('/<>/' , '', $wbddrss); var_dump($validate); } ?> But I would like to replace all chars that do not meet what is allowed. I guess the best solution would be to replace everything with a caret to negate. But it seems I cant find the right delimiters. This is the range of characters I would like to allow: A-Za-z0-9+&@#/%?=~_|!:,.;\(\) how is this done in a preg_replace function?
×
×
  • Create New...