mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
Merge pull request #3881 from RaiKoHoff/Dev_Master
RegEx Scanner: don't allow XML tagging brackets as part of Hyperlink text
This commit is contained in:
commit
c0b5ddcd5f
@ -101,13 +101,13 @@ static LPCWSTR const s_pUnicodeRegEx = L"(\\\\[uU|xX]([0-9a-fA-F]){4}|\\\\[xX]([
|
||||
|
||||
//#define HYPLNK_REGEX_VALID_CDPT L"a-zA-Z0-9\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF+&@#/%=~_|$"
|
||||
|
||||
#define HYPLNK_REGEX_VALID_CDPT "\\p{L}\\p{N}\\p{S}+&@#/%=~_|$"
|
||||
#define HYPLNK_REGEX_VALID_CDPT "\\p{L}\\p{N}\\p{Sc}\\p{So}\\*\\[\\];^°+§&@#/%=~_|'\""
|
||||
|
||||
static LPCSTR const s_pUrlRegExA = "\\b(?:(?:https?|ftp|file)://|www\\.|ftp\\.)"
|
||||
"(?:\\([-" HYPLNK_REGEX_VALID_CDPT "?!:,.]*\\)|[-" HYPLNK_REGEX_VALID_CDPT "?!:,.])*"
|
||||
"(?:\\([-" HYPLNK_REGEX_VALID_CDPT "?!:,.]*\\)|[" HYPLNK_REGEX_VALID_CDPT "])";
|
||||
"(?:\\([-" HYPLNK_REGEX_VALID_CDPT "?!:,.]*\\)|[-)" HYPLNK_REGEX_VALID_CDPT "?!:,.])*"
|
||||
"(?:\\([-" HYPLNK_REGEX_VALID_CDPT "?!:,.]*\\)|[)" HYPLNK_REGEX_VALID_CDPT "])";
|
||||
|
||||
#define HYPLNK_REGEX_VALID_CDPT_W L"\\p{L}\\p{N}\\p{S}+&@#/%=~_|$"
|
||||
#define HYPLNK_REGEX_VALID_CDPT_W L"\\p{L}\\p{N}\\p{Sc}\\p{So}\\*\\[\\];^°+§&@#/%=~_|'\""
|
||||
|
||||
static LPCWSTR const s_pUrlRegEx = L"\\b(?:(?:https?|ftp|file)://|www\\.|ftp\\.)"
|
||||
L"(?:\\([-" HYPLNK_REGEX_VALID_CDPT_W L"?!:,.]*\\)|[-" HYPLNK_REGEX_VALID_CDPT_W L"?!:,.])*"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user