Browse Source

Merge pull request #932 from annando/markdown-more-elements

Markdown: Protecting some more BBCode elements
pull/934/head
Hypolite Petovan 3 years ago committed by GitHub
parent
commit
14850e553a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      markdown/markdown.php

3
markdown/markdown.php

@ -50,7 +50,8 @@ function markdown_post_local_start(App $a, &$request) {
}
// Elements that shouldn't be parsed
$elements = ['code', 'noparse', 'nobb', 'pre', 'share', 'url', 'img'];
$elements = ['code', 'noparse', 'nobb', 'pre', 'share', 'url', 'img', 'bookmark',
'audio', 'video', 'youtube', 'vimeo', 'attachment', 'iframe', 'map', 'mail'];
foreach ($elements as $element) {
$request['body'] = preg_replace_callback("/\[" . $element . "(.*?)\](.*?)\[\/" . $element . "\]/ism",
function ($match) use ($element) {

Loading…
Cancel
Save