xhtml - Scala xhtml 属性因问号而中断

标签 xhtml scala iframe attributes

我有一个问题:

 <iframe id="iframe1" src='http://stockcharts.com/h-sc/ui?s=MT&p=D&yr=2&mn=0&dy=0&id=p43321191731' width="300px" height="300px"></iframe>

在 Lift 网络框架 (Scala) 版本中。我得到:

Message: java.util.NoSuchElementException
scala.RandomAccessSeq$$anon$13.next(RandomAccessSeq.scala:165)
scala.xml.parsing.MarkupParser$class.normalizeAttributeValue(MarkupParser.scala:1191)

结果是 iframe src 属性中的问号 ? 导致了这一点。 我该怎么做才能快速解决这个问题?

最佳答案

http://www.mail-archive.com/liftweb@googlegroups.com/msg08961.html

问题是&号,需要转义

<iframe id="iframe1" src='http://stockcharts.com/h-sc/ui?s=MT&amp;p=D&amp;yr=2&amp;mn=0&amp;dy=0&amp;id=p43321191731' widt    h="300px" height="300px"></iframe>

关于xhtml - Scala xhtml 属性因问号而中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2888632/

相关文章:

css - 分辨率较小,内容尽量适合

JavaScript:状态栏不显示带有链接 IE9 的鼠标悬停文本

Scala 递归类型

android - 如何在 chrome 上的新方案中将参数传递给 android Intent?

javascript - 将YouTube视频嵌入到iframe中

javascript - jQuery 正则表达式帮助

javascript - 如何在此 jquery slider 中添加 "pause"按钮?

testing - Scala 构建工具和测试框架可以很好地协同工作吗?

postgresql - 如何通过 Doobie 将案例对象插入为 JSONB 格式?

javascript - 向网页提交多个表单