我在.erb文件中有以下代码:
<% embed='<a href="http://someurl.com/whatever">#{@webcast.name}</a>'%> <p id="embedCode"> <pre> <code> <%= embed %> </code> </pre> </p>
锚标记在屏幕上正确显示为文本而不是呈现为dom元素,但字符串插值失败. html已成功显示为文本,但未评估#{@webcast.name}.如果包含<%= @ webcast.name =>在模板中,成功呈现网络广播名称.
解决方法
原文地址:https://www.jb51.cc/html/226075.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。