Python中文
首页
教程
问答
标签
搜索
登录
注册
Genshi:TemplateSyntaxError:not well format(无效标记),在<script>标记中带有和号
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我正在使用Pylons/Genshi,并试图用一个discus javascript小部件显示我的站点上的“所有最近的评论”(discus安装在站点上,我可以发布评论)。在</p> <p>但是,下面的代码产生了一个严重的500错误:</p> <p><strong>TemplateSyntaxError:格式不正确(无效标记):第25行,第121列</strong>(第25行是<code><script></code>行)。在</p> <pre><code> <div py:def="content"> <div id="recentcomments" class="dsq-widget"> <h2 class="dsq-widget-title">Recent Comments</h2> <script type="text/javascript" src="http://disqus.com/forums/wdmmg/recent_comments_widget.js num_items=5&hide_avatars=0&avatar_size=32&excerpt_length=200"></script> </div> </div> </code></pre> <p>奇怪的是,我认为这可能与GET请求中的<code>&</code>符号有关,因为使用</p> ^{pr2}$ <p>在同一条线上工作很好。Genshi不喜欢<code>&</code>符号,还是发生了其他事情?在</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>在XML中,应该对与号进行编码,因为它们有特殊的含义。在</p> <p>在url中使用它们的正确方法是<code>recent_comments_widget.js?num_items=5&amp;hide_avatars=0&amp;avatar_size=32&amp;excerpt_length=200</code></p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
无法使用Django/mongoengine连接到MongoDB(身份验证失败)
10 回答
无法使用Django\u mssql\u后端迁移到外部hos
9 回答
无法使用Django&Python3.4连接到MySql
3 回答
无法使用Django+nginx上载媒体文件
3 回答
无法使用Django1.6导入名称模式
10 回答
无法使用Django1.7和mongodb登录管理站点
5 回答
无法使用Djangoadmin创建项目,进程使用了错误的路径,因为我事先安装了错误的Python
7 回答
无法使用Djangockedi验证CBV中的字段
1 回答
无法使用Djangocketditor上载图像(错误400)
8 回答
无法使用Djangocron进行函数调用
3 回答
无法使用Djangofiler djang上载文件
1 回答
无法使用Djangokronos
8 回答
无法使用Djangomssql provid
1 回答
无法使用Djangomssql连接到带有Django 1.11的MS SQL Server 2016
3 回答
无法使用Djangomssq迁移Django数据库
7 回答
无法使用Djangonox创建用户
1 回答
无法使用Djangopyodb从Django查询SQL Server
10 回答
无法使用Djangopython3ldap连接到ldap
10 回答
无法使用Djangoredis连接到redis
7 回答
无法使用Django中的FK创建新表
10 回答