S
S
Sergey Melnikov2016-05-04 15:11:39
Yii
Sergey Melnikov, 2016-05-04 15:11:39

How to programmatically remove all comments before displaying the page to the visitor?

Hi all.
Tell me how to remove all html comments in a yii2 project when the page is shown to the visitor?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2016-05-04
@beatleboy

I advise you to dig on GitHub.
For example , here is one of the implementations , I think it will not be difficult to tie it to Yii

E
Egor, 2016-05-04
@want2know

1) php.net/manual/en/function.strip-tags.php
2) HTML Purifier
Use events www.yiiframework.com/doc-2.0/guide-structure-views... View component

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question