Menu

#22 Attribute::buildFromString() and "`"

TOLB
open
nobody
5
2002-12-07
2002-12-07
Marek Gibek
No

Attribute::buildFromString() method doesn't decode "`"
character from encoded string (= single "`" appears twice in the
decoded string).

Worse, if string to encode was contains "`-
`" it is encoded to "``-``" and then it can be wrongly treated as a
separator "`-`" between name "`" and type "`". This happends with
"`=`", too.

The only solution is to look if number of
consequence "`" characters is odd. Only then sequence "`-`" or
"`=`" can be treated as a separator.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB