You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
397 B
20 lines
397 B
15 years ago
|
|
||
|
function html2text( html )
|
||
|
{
|
||
|
var text = html.replace( /<[^>]*>/g, '' );
|
||
|
text = text.replace( /"/g, '"' );
|
||
|
text = text.replace( /</g, '<' );
|
||
|
text = text.replace( /&/g, '&' );
|
||
|
|
||
|
return text;
|
||
|
}
|
||
|
|
||
|
function text2html( text )
|
||
|
{
|
||
|
var html = text.replace( /&/g,"&");
|
||
|
html = html.replace( /"/g,""");
|
||
|
html = html.replace( /</g,"<");
|
||
|
|
||
|
return html;
|
||
|
}
|