<神鬼寓言3> ???

Shouldn't a browser's textarea display raw text? Look at the following snaps from , and pay attention to the &script& tag:
1- We can see the angled brackets around the script word:
2- Now look at the source of the page. We can see the angled brackets are represented by their HTML entities:
3- Click to edit the post and you'll see that the angled brackets are visible in the textarea--NOT their HTML entities:
4- Look at the XHR response from the server (when we clicked edit), we can see the HTML entities and NOT the angled brackets we see in the textarea:
How is it possible that the textarea--when editing the post--displays the angled brackets and not their HTML entities? Shouldn't textareas display raw text? I tried this on my site, and the textarea shows the HTML entities, and not brackets, with identical source code.
The post page also shows the angled brackets even when they are inside code and pre tags. Shouldn't they be output as raw text too? I also tried this on my site, and the page shows the HTML entities, and not the angled brackets.
What I am missing here?
I'm asking because struggling with implementing a feature on my site. I want to show people the encoded entities when they go to edit something, but I want to store a raw version. SO seems to have done, but I have no idea how.
解决方案 See
and consider
in HTML (take a peek at the
although do note it is insufficient to entirely describe HTML).
The script (and style) elements have such a CDATA designation while textarea does not. Store the data as it ("unescaped") but make sure to HTML-encoded outside of CDATA sections in the HTML (and even inside, take care to guard against terminators like &/anything -- the & and / characters must be separated to be entirely legal in HTML). See
for some more details.
Happy coding.
本文地址: &
浏览器的textarea是否应显示原始文字?查看,并注意& script& 标记:
1-我们可以看到围绕脚本字的尖括号:
2-现在看一下页面的源代码。我们可以看到尖括号由它们的HTML实体表示:
3-单击以编辑帖子,您会看到尖括号可见textarea
- 不是其HTML实体:
4-看看服务器的XHR响应(当我们点击编辑)可以看到HTML实体,而不是我们在textarea中看到的尖括号:
- 显示尖括号而不是它们的HTML实体?应该不是textareas显示原始文本?我尝试在我的网站上,并且textarea显示HTML实体,而不是括号,具有相同的源代码。
帖子页也显示了尖括号,即使他们是代码和 pre 标签。它们不应该作为原始文本输出吗?我也在我的网站上试过这个,页面显示的是HTML实体,而不是尖括号。
这里缺少什么?
我问,因为在我的网站上实现一个功能。我想在编辑实体时向他们显示编码实体,但我想存储一个原始版本。 SO似乎已经做了,但我不知道如何。
解决方案 请参阅,并考虑(查看
本文地址: &
扫一扫关注官方微信前段时间,我们惊喜的得知了《神鬼寓言:财富》的存在,该作在前不久登陆Kickstarter展开众筹,令人惊讶的是,工作室日前宣布取消这个众筹项目,但游戏将仍然发行。
06/22 09:00:23
神鬼寓言:财富攻略大全
《神鬼寓言:财富》试玩视频演示 神鬼寓言财富好玩吗? 01-20
神鬼寓言财富配置要求高吗?最低配置要求一览 01-20
神鬼寓言财富什么时候出?具体发售时间一览 01-20
暂无任何记录
暂无任何记录
神鬼寓言:财富下载大全
神鬼寓言:财富测试版 07-21
神鬼寓言:财富测试版
暂无任何记录
暂无任何记录
暂无任何记录
神鬼寓言:财富?游戏视频
热门评论/最新评论
神鬼寓言:财富Fable Fortune
《神鬼寓言:财富(Fable Fortune)》是一款免费卡牌游戏,游戏玩法与《炉石传说》极为相似,玩家需要从8张预选卡牌栏里进行英雄选择,通过使用卡牌组合、各种法术攻击将对手的生命值降为0。本作还引入了那些大家熟悉的“神鬼寓言式”元素,比如完成中期匹配任务,像铸造某种类型的卡牌、消耗一定的法力让你去做个或好或坏的决定,改变你的英雄,甚至将某些卡牌转变成新的形式。
神鬼寓言系列
游戏类型:角色扮演
游戏平台:PC
游戏制作:Lionhead Studios
游戏类型:角色扮演
游戏平台:PC
游戏制作:Lionhead Studios
游戏类型:角色扮演
游戏平台:PC
游戏制作:Lionhead Studios
游戏类型:角色扮演
游戏平台:PC
游戏制作:Lionhead Studios
CopyRight2004年-年
游迅网 All Rights Reserved
备案编号:沪ICP备号-9

参考资料

 

随机推荐