当我尝试粘贴 HTML 文本文件时,我不断被踢出外壳。如何才能做到这一点?我首先需要使用一些javascript对其进行编码吗?
例子:
db.test.insert({x:"<div id='product-description'><p>Who hasn’t wished for a mini-Roomba to handle the arduous task of cleaning their iPhone screen? Now your dreams have come true!</p> <p>See the Takara web page for a <a href='http://www.takaratomy.co.jp/products/automee/' title='automee s' target='_blank'>demo video.</a></p>
<p><strong>Colors: </strong> White, Red, Orange and Blue<br>
Runs on a single AA battery.</p>
<p>1,575 yen</p><!-- end #product-description --></div>"})
编辑
我在我的 html 中只放了单引号,并将整个内容用双引号括起来,但还是不行。外壳错误:
> j = ({z:"<div id='product-description'><p>Who hasn
---
Unicode text could not be correctly displayed.
Please change your console font to a Unicode font (e.g. Lucida Console).
---
’
bye