fixes for attribute escaping and value use in builder vars