HTML tag |javascript
/*** Remove all HTML tags and javascript tags*/function Replacehtmlandjs ($document) {$document = trim($document); if (strlen($document) 0) { return $document ; }$search = Array ("' ' si", Remove JavaScript"' ]*?>' Si ',
Remove all tags in HTML code
Copy codeThe Code is as follows: '******************************
'Function: RemoveHTML_A (strText)
'Parameter: strText, string to be processed
'Prepared by: alixixi
'Date: 2007/7/12
'Description: removes all tags from
How to remove all html tags using python
This article mainly introduces how to remove all html tags from python. It involves the skills related to Python Regular Expression replacement. It is very simple and practical. For more information, see
Remove unnecessary HTML tags from php
Echo strip_tags ($ str );
2. retain onlyFor a tag, you only needThe string is written to the second parameter of strip_tags.
Echo strip_tags ($ str ,"");
3.
When the background returns content from the Rich text editor to the front end, you can use this method to preserve text only if you bring a label.There are several formats for labels:1.2.3. Custom LabelsFor the above types of labels, the rules for
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.