$value = stripNoMarkdownTag($value);
continue;
}
+ $value['description_src'] = $value['description'];
$value['description'] = process_markdown(
$value['description'],
$conf->get('security.markdown_escape', true),
|| $data['_PAGE_'] == Router::$PAGE_DAILY
|| $data['_PAGE_'] == Router::$PAGE_EDITLINK
) {
-
$data['css_files'][] = PluginManager::$PLUGINS_PATH . '/markdown/markdown.css';
}
// Detect and toggle block of code
if (!$codeBlockOn) {
$codeBlockOn = preg_match('/^```/', $descriptionLine) > 0;
- }
- elseif (preg_match('/^```/', $descriptionLine) > 0) {
+ } elseif (preg_match('/^```/', $descriptionLine) > 0) {
$codeBlockOn = false;
}
foreach ($escapeTags as $tag) {
$description = preg_replace_callback(
'#<\s*'. $tag .'[^>]*>(.*</\s*'. $tag .'[^>]*>)?#is',
- function ($match) { return escape($match[0]); },
- $description);
+ function ($match) {
+ return escape($match[0]);
+ },
+ $description
+ );
}
$description = preg_replace(
'#(<[^>]+\s)on[a-z]*="?[^ "]*"?#is',
'$1',
- $description);
+ $description
+ );
return $description;
}
->text($processedDescription);
$processedDescription = sanitize_html($processedDescription);
- if(!empty($processedDescription)){
+ if (!empty($processedDescription)) {
$processedDescription = '<div class="markdown">'. $processedDescription . '</div>';
}