Jump to content


elitLG

Member Since 12 Apr 2012
Offline Last Active Mar 06 2013 05:26 AM
-----

#10684 What are the rules for the comma character (,) in selectors?

Posted by elitLG on 17 April 2012 - 05:48 AM

Hi,

I'm trying to build a search function using selectors but when "sanitizing" a string, containing a comma, with Sanitizer::selectorValue it sometimes removes the comma. Here are some test runs (first row is input, second is selectorValue output) :

'test'
'test'

"test'
"test"

,test, '
"test '"

'
''

','test'
"'test"

guns n' roses, mötley crüe
"guns n' roses mötley crüe"

','test
"'test"

"''"
""

,
""

test, test2
"test, test2"
Also in the documentation for selectorValue it says:

Replaces disallowed characters with spaces

does this mean you can't search for all characters (comma)?


#10546 addHookBefore save Page, is there a way to get values being replaced?

Posted by elitLG on 12 April 2012 - 04:50 AM

Hi,

Like the title says, is there a way to check what the values were before saving, to check for fields that have changed etc.

Both the before and after event now seems to get the Page object after it has been updated.