PHP fixes HTML tags that are not normally closed and support nesting and nearby closure. For more information about how to use fixHtmlTag, see fixHtmlTag.
Version 0.2:
This version solves the problems left over from the last time, that is, proximity
FixHtmlTag
Version 0.2:
This version solves the problems left over from the last time, that is, proximity closure and nested closure. For more information, see the comments of the Code.
Copy codeThe Code is as follows:
/*** FixHtmlTag** HTML Tag
Meet the problemI wrote a few lines as follows, but the table is not displayed by the line, the line break becomes a space, so I want to convert the nextThinking questions1, can see the contents of the table is the back end of the data, so you want
Html tag closure detection and repair
Html tag closure detection and repair, which is a little big and not fully considered. Regular expressions are not used. this applies to html files where only the start tag does not end the tag, the end
HTML tag closure detection and repair, said a bit large, and did not consider a very complete, no use of regular expressions, applicable to the HTML file only the start tag does not have the end tag, there is an end tag is not the beginning of the
a common head element tag The element contains all the header tag elements.1. The tag defines the title of the HTML document, which is required in the html/xhtml document.Main functions:
Defines the title of the browser toolbar;
The
The auto-completion closure function found on the internet is quite good. it can be fully closed based on your html content to ensure that the HTMl code is correctly and simply explained:
First ~ (] +?> )~ Si
This regular expression is matched. .
Php makes HTML tag auto-completion closed function code to explain some code:
First ~ (] +?> )~ Si
This regular expression is matched. . Simply put, all
.
Second ~ ] *? /> ~ Si
This regular expression is matched ...... />. Is a single closed
The auto-completion closure function found on the internet is quite good. It can be fully closed based on your html content to ensure that the HTMl code is correctly and simply explained:
First ~ (] +?> )~ Si
This regular expression is matched. .
The auto-completion closure function found on the internet is quite good. it can be fully closed based on your html content to ensure that the HTMl code is correctly and simply explained:
First ~ (] +?> )~ Si
This regular expression is matched. .
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.