In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article "what is the html tag contained in the body field of the detailed page of the article" is not quite understood by most people except programmers. Today, in order to make you better understand "what the body field of the detailed page of the article contains the html tag is", we have summarized the following contents, which have a certain reference value, the detailed steps of the content are clear, and the details are handled properly. I hope you can gain something through this article. Now let's take a look at the details.
The text field of the article uses a rich text editor, which can be typeset directly in the editor, and the final data saved to the database is in html format, such as:
This is the text.
The first paragraph of the text
The second paragraph of the text
When this content is displayed to the browser as html, there is no html tag.
...
Display it, but only show the contents of the tag. For example:
This is the first paragraph of the text and the second paragraph of the text.
However, in order to prevent xss cross-site scripting attacks, the template usually escapes the output by html, that is, the
< >Escape into
< >So that the html tag is displayed directly
Freemarker usually uses? html for escape, such as ${text?html}, which escapes each output variable.
There is another way to escape a piece of freemarker code, such as:
[# escape x as (x)!? html]... ${text}... [/ # escape]
This is why the html tag appears in the body. Note that the beginning and end of the template contain this code, and if so, it means that all output variables are html escaped.
If you want some variables not to be html escaped, you can solve this problem in the following ways:
[# escape x as (x)!? html]... [# noescape] ${text} [/ # noescape]... [/ # escape] Thank you for your reading. I hope you have a certain understanding of the key question "what is the html tag in the body field of the detailed page of the article?" the specific usage still requires hands-on experiments before you can understand it. Go and try it. If you want to read more articles about relevant knowledge points. Welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.