Skip to content

Commit

Permalink
Prevent XSS between balanced parentheses.
Browse files Browse the repository at this point in the history
  • Loading branch information
ngnpope committed Sep 21, 2010
1 parent ea9839c commit c94ba72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Twitter/Regex.php
Expand Up @@ -50,7 +50,7 @@ abstract class Twitter_Regex {
*
* @var string
*/
const REGEX_URL_CHARS_PATH = '(?:(?:\([^\)]+\))|@[^\\/]+\\/|[\\.\\,]?[a-z0-9!\\*\';:=\\+\\$\\/%#\\[\\]\\-_,~])';
const REGEX_URL_CHARS_PATH = '(?:(?:\([a-z0-9!\\*\';:=\\+\\$\\/%#\\[\\]\\-_,~]+\))|@[^\\/]+\\/|[\\.\\,]?[a-z0-9!\\*\';:=\\+\\$\\/%#\\[\\]\\-_,~])';

/**
* Expression to match characters that may come at the end of the URL path.
Expand Down

0 comments on commit c94ba72

Please sign in to comment.