dongmao7195 2017-02-13 14:44
浏览 32
已采纳

输入无法在视图中呈现[关闭]

I use fat free framework and fuelux repeater. When I create an html element in controller files, I can't see the element in view. I realize what the problem it is, but I don't know the solution.

Checkbox in repeater

  • 写回答

1条回答 默认 最新

  • douhua9726 2017-02-13 14:53
    关注

    You have to print the raw HTML, since F3's template engine is automatically escaping it. Have a look at: https://fatfreeframework.com/3.6/views-and-templates#DataSanitation

    Either use $f3->set('ESCAPE',FALSE); to disable escaping globally (not recommended) or add a filter in your template for the variable you want to keep unescaped like this: {{ @html_content | raw }}

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿