Home > Backend Development > PHP Tutorial > Think how do you masters smarty parse the HTML of PHP data into entities?

Think how do you masters smarty parse the HTML of PHP data into entities?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-18 09:16:00
Original
1253 people have browsed it

For example, I have something like this in the database: <b>aaaaaa</b>;
I take out the data and use smarty to achieve code separation, but when I put it on smarty, the data is parsed according to html, and my The expectation is to display the data as it is, but I can’t find the answer on the search engine. I have been using laravel’s blade template before, so when I encounter similar problems, I come to ask the seniors who use smarty for advice

Reply content:

For example, I have something like this in the database: <b>aaaaaa</b>;
I take out the data and use smarty to achieve code separation, but when I put it on smarty, the data is parsed according to html, and my The expectation is to display the data as it is, but I can’t find the answer on the search engine. I have been using laravel’s blade template before, so when I encounter similar problems, I come to ask the seniors who use smarty for advice

<code> {$output | escape} </code>
Copy after login

In smarty, the output content is followed by escape to escape html tags.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template