没有将数据url字符串放入临时

2024-04-20 09:37:32 发布

您现在位置:Python中文网/ 问答频道 /正文

我不是一个专业烧瓶,但有一个字符串的大小被粘贴到模板的限制

我的模板如下所示:

{% if taint is not none and url is not none %}
    [...]
    }
    update(d);
    }

    </script>
    <a href="data:image/svg+xml;base64,{{ url }}" target="_blank"><center><i>See full context</i></center></a>
</div>
{% endif %}

变量url在app.py(主循环)中打印时包含以下数据:https://pastebin.com/RZLuRSJC

但数据永远不会出现在呈现的站点中:

    [...]
      d.children = null;
    } else {
        d.children = d._children;
        d._children = null;
    }
    update(d);
    }

    </script>
    <a href="data:image/svg+xml;base64," target="_blank"><center><i>See full context</i></center></a>
</div>

你知道为什么吗?数据是svg图像


Tags: 数据svgimagenone模板urldatais
1条回答
网友
1楼 · 发布于 2024-04-20 09:37:32

我实际上是在一个小的学生小组工作,必须找出另一个学生的代码。我的错误是在render_template()方法中只传递taint变量!谢谢你的提示!:)

相关问题 更多 >