I work with a website based on some user-defined template system. Let's say that in the template I can use the [custom_text] tag , which will display the entire html block, like this, defined in the CMS text editor:
<b>Lorem ipsum dolor</b> sit amet, "consectetur adipisicing elit"<br /><br />
<b>sed doeiusmod</b> tempor incididunt ut labore et dolore magna aliqua.
Please note that it contains both types of quotes. I cannot preprogram everything that comes out of the template system, except to actually output it to the page, since the CMS system with the template system is encoded.
Now I really need to manipulate this block, for example, to remove all line breaks from the code. I can use php on the page, but I can not determine the line that will contain this block of code. If I do this anyway:
$string = "[custom_text]";
$string = '[custom_text]';
quotes in the block will appear on the path, ending the line prematurely. Is there an obvious way to deal with this problem?
source
share