Fixed nested quotes not being properly escaped
Added a more robust test for nested quotes in attributes