如何从模块前台输出中删除注释块

How to remove the comments blocks from module front office output

PS 1.7 中的模块在前台呈现某些内容如下所示:

    <!-- begin modules/jemaa//views/templates/widget/url.tpl --> 
Rendered string here 
    <!-- end modules/jemaa//views/templates/widget/url.tpl -->

如何去掉这些评论而只得到"rendred string"?

事实上,我需要在 img html 标签的 src 属性中显示 url 字符串。

提前感谢您平时的帮助

糟糕,它只发生在调试模式下。 对应的代码在classes/Smarty/SmartyResourceModule,在fetch方法中:

        if (_PS_MODE_DEV_) {
            $source = implode('', array(
                '<!-- begin ' . $file . ' -->',
                file_get_contents($file),
                '<!-- end ' . $file . ' -->',
            ));
        } else {
            $source = file_get_contents($file);
        }

谢谢你的时间。