fix img attrs rendering in trusted mode