bug 1138: Add some mising escaping for values from the database