Hi,
Multibyte Character does not work.
cause: It's title="regular expression" error.
reason: It's first argument 1byte character.
But, Japan,korea,china,etc....many 2byte character.
/* Example */
[acronym title=Hello!]Hello English[/acronym]
[acronym title=こんにちは!]Hello Japanese[/acronym]
[acronym title=안녕하세요!]Hello Korean[/acronym]
[acronym title=你好!]Hello Chinese[/acronym]
I fixd regular expression.
before:
'#\[acronym=([\w\s-,\.]+)(?::\w+)?\](.*?)\[/acronym(?::\w+)?\]#si'
'#\[abbr=([\w\s-,\.]+)(?::\w+)?\](.*?)\[/abbr(?::\w+)?\]#si'
after:
'#\[acronym=(.*?)(?::\w+)?\](.*?)\[/acronym(?::\w+)?\]#si'
'#\[abbr=(.*?)(?::\w+)?\](.*?)\[/abbr(?::\w+)?\]#si'
result: It's work.
Please change an original cord if there is not no problem.
I'm sorry to trouble you but thank you for your help.
Thanks
Comments
Comment #1
naudefj commentedAre you sure it's the multi-byte characters and not the exclamation mark (!) that's causing the problem?
PS: The problem with your regular expressions is that they will allow HTML injection.
Comment #2
batumaru commentedAsian's 2byte character is not [:alnum:].
And I add a sanitizing cord.
I try to think about PATTERN a little more.
Thanks
Comment #3
batumaru commentedI'm sorry.
Title post mistake.
Thank you for support.