简体   繁体   English

manifest.js HTML未评估

[英]reveal.js HTML not evaluated

I am using Hakim El Hattab's amazing reveal.js, and besides the problem below (which is due to my placeholders I noticed...), the script is working awesome for me. 我正在使用Hakim El Hattab的惊人的Reveal.js,除了下面的问题(这是由于我注意到了占位符引起的),该脚本对我来说很棒。

Due to this being because of my placeholders, the problem is not with the script, but I believe that there will be some genius here somewhere that could point me in the right direction with this. 由于这是由于我的占位符,问题不在于脚本,但我相信这里有些天才可以为我指出正确的方向。

I am using the following HTML in my CMS: 我在CMS中使用以下HTML:

<div class="societe-tpl-1">
    <div class="societe-tpl-1-header">
        [[HOME]]
        <div class="societe-tpl-1-header-separator">|</div>
        [[CONTENTS]]
        [[INDEX]]
        [[DOWN]]
        [[UP]]
        [[NEXT]]
        [[PREVIOUS]]
    </div>
    <div class="societe-tpl-1-content">
        <div class="societe-tpl-4-contents retro-apps">
            <div class="third">
                <div class="pg-number">[[PAGENUM]]</div>
                <h1>[[HEAD1]]</h1>
            </div>
            <div class="third">
                [[IMAGE1]]
                [[IMAGE2]]
                [[IMAGE3]]
            </div>
            <div class="third">
                <article>
                    <h2>[[SUBHEAD_1]]</h2>
                    <p>[[SUBTEXT_1]]</p>
                </article>
                <article>
                    <h2>[[SUBHEAD_2]]</h2>
                    <p>[[SUBTEXT_2]]</p>
                </article>
                <article>
                    <h2>[[SUBHEAD_3]]</h2>
                    <p>[[SUBTEXT_3]]</p>
                </article>
            </div>
        </div>
    </div>
    <div class="societe-tpl-1-footer">
        <div class="societe-tpl-1-footer-nextmonth">
            <a href="#">next month</a>
        </div>    
        <div class="societe-tpl-1-footer-mainsite">
            <a target="_blank" href="http://www.renault.co.za">www.renault.co.za</a>
        </div>            
    </div>
</div>

Using my CMS based on Code Igniter, I replace the placeholders with the appropriate code which I read from MySQL database. 使用基于Code Igniter的CMS,我将占位符替换为从MySQL数据库读取的相应代码。 Where I have the the placeholders, the HTML does not get evaluated, but the HTML in the "Next month" link does get evaluated. 如果有占位符,则不会评估HTML,但是会评估“下个月”链接中的HTML。

示例输出问题

Anyone with any idea why my code in placeholders does not get evaluated? 有人知道为什么我的占位符中的代码没有得到评估吗? I am using a PHP script that replace the placeholders with their real content before page rendering (Code Igniter's display_override hook), so they are replaced before reveal.js kicks in, as far as I can tell. 我正在使用一个PHP脚本,在页面渲染之前将占位符替换为其实际内容(Code Igniter的display_override钩子),因此,据我所知,它们在替换show.js之前就被替换了。

Thanks in advance! 提前致谢!

I found the solution. 我找到了解决方案。 The data got saved in the database as HTML entities ( &lt; and &gt; ) and therefore the filter replacing the <a> tags did not work. 数据已作为HTML实体( &lt;&gt; )保存在数据库中,因此替换<a>标记的过滤器不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM