Python3: base virtualBuffer: coerce attribute values to a string before escaping for regular expression (#9759)
* Base virtualBuffer: make sure to coerce values to a string before escaping xml characters.
* Actually coerce the string :)
* Correct comment.