From: Alexander Ebert Date: Wed, 6 Jul 2016 13:41:14 +0000 (+0200) Subject: Added support for [wsm] and partially [wsmg] X-Git-Tag: 3.0.0_Beta_1~1256 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65f833f26a79c2558b461ca1d539fa56eae9bd06;p=GitHub%2FWoltLab%2FWCF.git Added support for [wsm] and partially [wsmg] --- diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index 57f1adfc65..c27854df96 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -757,6 +757,11 @@ com.woltlab.wcf.message.embeddedObject + + com.woltlab.wcf.media + com.woltlab.wcf.message.embeddedObject + + diff --git a/com.woltlab.wcf/templates/mediaBBCodeTag.tpl b/com.woltlab.wcf/templates/mediaBBCodeTag.tpl new file mode 100644 index 0000000000..448dcfedd1 --- /dev/null +++ b/com.woltlab.wcf/templates/mediaBBCodeTag.tpl @@ -0,0 +1 @@ +{$media->getTitle()} \ No newline at end of file diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Editor.js b/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Editor.js index d0b6fe44ec..c8255cd64a 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Editor.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Editor.js @@ -208,7 +208,7 @@ define(['Core', 'Dictionary', 'Dom/Traverse', 'Language', 'Ui/Dialog', 'WoltLab/ }); this._options.editor.buffer.set(); - this._options.editor.insert.text('[wsm]' + mediaIds.join(',') + '[/wsm]'); + this._options.editor.insert.text("[wsmg='" + mediaIds.join(',') + "'][/wsmg]"); }, /** @@ -241,7 +241,7 @@ define(['Core', 'Dictionary', 'Dom/Traverse', 'Language', 'Ui/Dialog', 'WoltLab/ this._options.editor.insert.html(''); } else { - this._options.editor.insert.text('[wsm]' + item.mediaID + '[/wsm]'); + this._options.editor.insert.text("[wsm='" + item.mediaID + "'][/wsm]"); } }, diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Redactor/Metacode.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Redactor/Metacode.js index a988193d8d..fba6bb17ba 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Redactor/Metacode.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Redactor/Metacode.js @@ -66,6 +66,12 @@ define(['Dom/Util'], function(DomUtil) { var buffer = '[' + name; if (attributes.length) { + for (var i = 0, length = attributes.length; i < length; i++) { + if (!/^'.*'$/.test(attributes[i])) { + attributes[i] = "'" + attributes[i] + "'"; + } + } + buffer += '=' + attributes.join(','); } diff --git a/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php b/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php index 8bb65fbb28..d3acbf260e 100644 --- a/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php @@ -9,7 +9,7 @@ use wcf\util\StringUtil; * that can be safely passed through HTMLPurifier's validation mechanism. * * All though not exactly required for all bbcodes, the actual output of an bbcode - * cannot be forseen and potentially conflict with HTMLPurifier's whitelist. Examples + * cannot be foreseen and potentially conflict with HTMLPurifier's whitelist. Examples * are