Project

General

Profile

Feature #25895 ยป t3core-feature-25895.patch

Fedir RYKHTIK, 2011-04-11 18:23

View differences:

typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js
html = html.replace(/<(b|strong|i|em|p|li|ul) [^>]*>/gi, "<$1>");
// Keep tags, strip attributes
html = html.replace(/ (style|class|align)=\"[^>\"]*\"/gi, "");
//remove MS specific classes
html = html.replace(/ class=\"(MsoNormal|MsoNormalTable)\"/gi, "");
// remove images
html = html.replace(/<\/?(img|imagedata)[^>]*>/gi, "");
// remove MS specific tags
html = html.replace(/<\/?(stroke|shape|shapetype|formulas|f|path|lock)[^>]*>/gi, "");
// kill unwanted tags: span, div, ?xml:, st1:, [a-z]:, meta, link
html = html.replace(/<\/?span[^>]*>/gi, "").
replace(/<\/?div[^>]*>/gi, "").
......
replace(/<title[^>]*>.*<\/title[^>]*>/gi, "");
// remove comments
html = html.replace(/<!--[^>]*>/gi, "");
// remove xml tags
html = html.replace(/<xml.[^>]*>/gi, "");
// Remove inline elements resets
html = html.replace(/<\/(b[^a-zA-Z]|big|i[^a-zA-Z]|s[^a-zA-Z]|small|strike|tt|u[^a-zA-Z])><\1>/gi, "");
// Remove double tags
    (1-1/1)