change util::sanitise to filter out '
Only reatain chars, numbers and -_.+$()@ Allowing the appostroph seems entirely random and unjustified here
This commit is contained in:
parent
d2309f003d
commit
a77ecb6d5d
3 changed files with 12 additions and 12 deletions
|
|
@ -57,7 +57,7 @@ namespace util {
|
|||
ChPredicate operator! (ChPredicate p) { return not bind(p,_1); }
|
||||
|
||||
// character classes used for sanitising a string
|
||||
ChPredicate isValid (is_alnum() or is_any_of("-_.+$'()@")); ///< characters to be retained
|
||||
ChPredicate isValid (is_alnum() or is_any_of("-_.+$()@")); ///< characters to be retained
|
||||
ChPredicate isPunct (is_space() or is_any_of(",;:#*~´`?\\=/&%![]{}<>")); ///< punctuation to be replaced by '_'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -336,8 +336,8 @@ namespace util {
|
|||
inline bool
|
||||
isSameObject (A const& a, B const& b)
|
||||
{
|
||||
return static_cast<const void*> (&a)
|
||||
== static_cast<const void*> (&b);
|
||||
return static_cast<const void*> (std::addressof(a))
|
||||
== static_cast<const void*> (std::addressof(b));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -350,14 +350,14 @@ namespace util {
|
|||
*
|
||||
* @par Example Conversions
|
||||
\verbatim
|
||||
"Word" --> 'Word'
|
||||
"a Sentence" --> 'a_Sentence'
|
||||
"trailing Withespace \t \n" --> 'trailing_Withespace'
|
||||
"with a lot \nof Whitespace" --> 'with_a_lot_of_Whitespace'
|
||||
"with\"much (punctuation)[]!" --> 'withmuch_(punctuation)'
|
||||
"§&Ω%€ leading garbage" --> 'leading_garbage'
|
||||
"mixed Ω garbage" --> 'mixed_garbage'
|
||||
"Bääääh!!" --> 'Bh'
|
||||
"Word" --> "Word"
|
||||
"a Sentence" --> "a_Sentence"
|
||||
"trailing Withespace \t \n" --> "trailing_Withespace"
|
||||
"with a lot \nof Whitespace" --> "with_a_lot_of_Whitespace"
|
||||
"@with\".\'much ($punctuation)[]!" --> "@with.much_($punctuation)"
|
||||
"§&Ω%€ leading garbage" --> "leading_garbage"
|
||||
"mixed Ω garbage" --> "mixed_garbage"
|
||||
"Bääääh!!" --> "Bh"
|
||||
\endverbatim
|
||||
* @see \ref UtilSanitizedIdentifier_test
|
||||
* @see \ref lib::meta::sanitisedSymbol()
|
||||
|
|
|
|||
|
|
@ -713,7 +713,7 @@ out-lit: 'trailing Withespace
|
|||
out-lit: ' --> 'trailing_Withespace'
|
||||
out-lit: 'with a lot
|
||||
out-lit: of Whitespace' --> 'with_a_lot_of_Whitespace'
|
||||
out-lit: 'with"much (punctuation)[]!' --> 'withmuch_(punctuation)'
|
||||
out-lit: '@with".'much (\$punctuation)[]!' --> '@with.much_(\$punctuation)'
|
||||
out-lit: '§&Ω%€ leading garbage' --> 'leading_garbage'
|
||||
out-lit: 'mixed Ω garbage' --> 'mixed_garbage'
|
||||
out-lit: 'Bääääh!!' --> 'Bh'
|
||||
|
|
|
|||
Loading…
Reference in a new issue