HTML to UBB and UBB to HTML
Function Pattern (STR)
{
//
STR = Str. Replace (/(\ r \ n | \ r)/ig ,'');
STR = Str. Replace (/STR = Str. Replace (/STR = Str. Replace (/\ [Code \] (. + ?) \ [\/Code \]/ig,
Function ($1, $2 ){
Return Phpcode ($2 );});
STR = Str. Replace (/\ son [\ W] {3, 16} \ s? = \ S * ([\ '\ "]). +? \ 1/ig ,'');
STR = Str. Replace (/STR = Str. Replace (/STR = Str. Replace (/ST
Ubb| Object | regular
Last time, we talked about how to use the "regular expression" object to validate various data in ASP, the powerful function of regular expression object is described in this article, and then we look at the other features of the regular Expression object. When we surf the internet, especially when browsing various forums, we often meet the word "U
Ubb| Object | regular
Last time, we talked about how to use the "regular expression" object to validate various data in ASP, the powerful function of regular expression object is described in this article, and then we look at the other features of the regular Expression object. When we surf the internet, especially when browsing various forums, we often meet the word "U
Ubb| Object | Regular Expression object in ASP is used to implement UBB style forum
Paste language: Inadvertently found in the Chinese network of this article, said that this site forum UBB style of the realization of the principle, so posted out and share with everyone.
We talked about how to use the "regular expression" object in ASP to achieve a variety of
PHP implementation of the method of converting UBB code, PHP conversion UBB code
This article describes the PHP implementation of the conversion Ubb code method. Share to everyone for your reference. Specific as follows:
function ubb2html ($content) {global $article;//whether automatic recognition of if ($article [' isparseurl '] = = "1") {$content = parseURL ($
Sometimes we need to use ubb to convert html. For example, when I leave a message, I want to use it for my friends. None? Phpfunctionubb ($ Text) {$ Texttrim ($ Text); $ Textereg_replace (n, br, $ Text); $ Textpreg_replace (\ tis, $ Text ); $ Textpreg_replace ([hr] is, hr, $ Te
Sometimes we need to use ubb to convert html. For example, when I leave a message, I want to use it for my friends. None? Phpfuncti
Ubb| Object | The last time we talked about how to use the regular expression object to validate various data in ASP, we described the powerful features of regular expression objects, and then we looked at other features of the regular Expression object. When we surf the internet, especially when browsing various forums, we often meet the word "UBB code". What is
CopyCode The Code is as follows: For the call method, see the source code in this example. UBB Code display: the page to display contains the UBB. asp file Ubbcode(server.html encode (Request ("content")
Add a post
title
content
Ubb last time, we talked about how to use the "regular expression" object in ASP to achieve a variety of data validation, the text describes the powerful function of regular expression objects, and then,
Let's take a look at the other features of the regular Expression object. When we surf the internet, especially when browsing various forums, we often meet "UBB
Php implements the ubb Code Conversion Method, and php converts ubb Code
This article describes how php converts ubb code. Share it with you for your reference. The details are as follows:
Function ubb2html ($ content) {global $ article; // whether to automatically recognize if ($ article ['isparseurl'] = "1 ") {$ content = parseurl ($ content);} // automatically
ubb| function ASP's UBB function (recommended)
function unhtml (content)
Unhtml=content
If content Unhtml=replace (unhtml, "", "")
Unhtml=replace (unhtml, "Unhtml=replace (unhtml, ">", ">")
Unhtml=replace (UNHTML,CHR (34), "" ")
Unhtml=replace (UNHTML,CHR), "Unhtml=replace (UNHTML,CHR (32), "")
' Unhtml=ubb (unhtml)
End If
End Function
function
Copy Code code as follows:
Call the method please see this example source code. UBB Code display: The page to be displayed contains ubb.asp this file Shown below: Ubbcode (Server.HTMLEncode (Request ("content"))
Discuz Forum UBB Editor Download
ASP's UBB function (recommended)
function unhtml (content)
Unhtml=content
If content Unhtml=replace (unhtml, "", "")
Unhtml=replace (unhtml, "Unhtml=replace (unhtml, ">", ">")
Unhtml=replace (UNHTML,CHR (34), "" ")
Unhtml=replace (UNHTML,CHR), "Unhtml=replace (UNHTML,CHR (32), "")
' Unhtml=ubb (unhtml)
End If
End Function
function Ubb (content)
Dim Nowtime,i
"/". The true regular expression is in the middle of two "/".2.HTML converted to UBBBecause the site uses UBB code is to improve security, and UBB code after writing only for browsing, very few will be written to convert HTML to UBB, even if there is more JS code to see, below I share a method I found on the internet,
Copy Code code as follows:
function unhtml (content)
Unhtml=content
If content Unhtml=replace (unhtml, "", "")
Unhtml=replace (unhtml, "Unhtml=replace (unhtml, ">", ">")
Unhtml=replace (UNHTML,CHR (34), "" ")
Unhtml=replace (UNHTML,CHR), "Unhtml=replace (UNHTML,CHR (32), "")
' Unhtml=ubb (unhtml)
End If
End Function
function Ubb (content)
Dim Nowtime,i
Last time, we talked about how to use the regular expression object in ASP to verify various data. This article describes the powerful functions of the regular expression object. Next,Let's take a look at other functions related to the regular expression object. When surfing the Internet, especially when browsing various forums, we often see "UBB Code"This word. What is
This article introduces the code of the Ubb code editor in php. For more information, see. This article introduces the code of the Ubb code editor in php. For more information, see.
Script ec (2); script
The Code is as follows:
/*Php Ubb Code Editor*/Function get_ubb ($ ubb ){$
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.