Revision 582db59d
Added by Assos Assos almost 9 years ago
drupal7/modules/filter/filter.module | ||
---|---|---|
93 | 93 |
'type' => MENU_SUGGESTED_ITEM, |
94 | 94 |
'file' => 'filter.pages.inc', |
95 | 95 |
); |
96 |
$items['filter/tips/%filter_format'] = array( |
|
97 |
'title' => 'Compose tips', |
|
98 |
'page callback' => 'filter_tips_long', |
|
99 |
'page arguments' => array(2), |
|
100 |
'access callback' => 'filter_access', |
|
101 |
'access arguments' => array(2), |
|
102 |
'file' => 'filter.pages.inc', |
|
103 |
); |
|
96 | 104 |
$items['admin/config/content/formats'] = array( |
97 | 105 |
'title' => 'Text formats', |
98 | 106 |
'description' => 'Configure how content input by users is filtered, including allowed HTML tags. Also allows enabling of module-provided filters.', |
... | ... | |
1119 | 1127 |
$body_node = $dom_document->getElementsByTagName('body')->item(0); |
1120 | 1128 |
$body_content = ''; |
1121 | 1129 |
|
1122 |
foreach ($body_node->getElementsByTagName('script') as $node) { |
|
1123 |
filter_dom_serialize_escape_cdata_element($dom_document, $node); |
|
1124 |
} |
|
1130 |
if ($body_node !== NULL) { |
|
1131 |
foreach ($body_node->getElementsByTagName('script') as $node) { |
|
1132 |
filter_dom_serialize_escape_cdata_element($dom_document, $node); |
|
1133 |
} |
|
1125 | 1134 |
|
1126 |
foreach ($body_node->getElementsByTagName('style') as $node) { |
|
1127 |
filter_dom_serialize_escape_cdata_element($dom_document, $node, '/*', '*/'); |
|
1128 |
} |
|
1135 |
foreach ($body_node->getElementsByTagName('style') as $node) {
|
|
1136 |
filter_dom_serialize_escape_cdata_element($dom_document, $node, '/*', '*/');
|
|
1137 |
}
|
|
1129 | 1138 |
|
1130 |
foreach ($body_node->childNodes as $child_node) { |
|
1131 |
$body_content .= $dom_document->saveXML($child_node); |
|
1139 |
foreach ($body_node->childNodes as $child_node) { |
|
1140 |
$body_content .= $dom_document->saveXML($child_node); |
|
1141 |
} |
|
1142 |
return preg_replace('|<([^> ]*)/>|i', '<$1 />', $body_content); |
|
1143 |
} |
|
1144 |
else { |
|
1145 |
return $body_content; |
|
1132 | 1146 |
} |
1133 |
return preg_replace('|<([^> ]*)/>|i', '<$1 />', $body_content); |
|
1134 | 1147 |
} |
1135 | 1148 |
|
1136 | 1149 |
/** |
... | ... | |
1484 | 1497 |
$tasks['_filter_url_parse_full_links'] = $pattern; |
1485 | 1498 |
|
1486 | 1499 |
// Match e-mail addresses. |
1487 |
$url_pattern = "[A-Za-z0-9._-]{1,254}@(?:$domain)"; |
|
1500 |
$url_pattern = "[A-Za-z0-9._+-]{1,254}@(?:$domain)";
|
|
1488 | 1501 |
$pattern = "`($url_pattern)`"; |
1489 | 1502 |
$tasks['_filter_url_parse_email_links'] = $pattern; |
1490 | 1503 |
|
Also available in: Unified diff
Update Drupal core to version 7.40