我有一個對象在我的控制器逃逸紅寶石代碼
@data="<meta property=\"og:url\"
content=\"<%=SITE_URL%><%=request.request_uri%>\"
/>".html_safe
當我打印這在我的視圖文件由<%= @數據%>它所生成的HTML是
<meta property="og:url"
content="<%=SITE_URL%><%=request.request_uri%>"
/>
如何用字符串打印/轉義紅寶石代碼?
19個問題,0個接受的答案 - 哇! – Wukerplank 2012-03-30 06:44:15
來吧你需要接受答案... – 2012-03-30 06:58:34