Fixed some issues
authorAlexander Ebert <ebert@woltlab.com>
Fri, 2 Jan 2015 15:52:13 +0000 (16:52 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 2 Jan 2015 15:52:13 +0000 (16:52 +0100)
Yes, I'm purposely stripping ' and " from filenames.

wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js
wcfsetup/install/lang/de.xml

index dc8f36c635cc158ca5b152d0e9d6f7e0684521d8..746593fb876f568ef78e9f8b4e15e3164f355d22 100644 (file)
@@ -243,7 +243,7 @@ RedactorPlugins.wbbcode = function() {
                                var $uuid = WCF.getUUID();
                                $cachedCodeListings[$uuid] = {
                                        codeContent: codeContent.replace(/<li>/g, '').replace(/<\/li>/g, '\n'),
-                                       filename: $filename,
+                                       filename: $filename.replace(/['"]/g, ''),
                                        highlighter: ($highlighter === 'plain' ? '' : $highlighter),
                                        lineNumber: (lineNumber > 1 ? lineNumber : 0)
                                };
@@ -1804,7 +1804,7 @@ RedactorPlugins.wbbcode = function() {
                                        var $highlighter = $('#redactorCodeHighlighter');
                                        var $lineNumber = $('#redactorCodeLineNumber');
                                        
-                                       var $codeFilename = $.trim($filename.val());
+                                       var $codeFilename = $.trim($filename.val().replace(/['"]/g, ''));
                                        var $bbcode = '[code=' + $highlighter.val() + ',' + $lineNumber.val() + ($codeFilename.length ? ",'" + $codeFilename + "'" : '') + ']';
                                        $bbcode += $codeBox.val().replace(/^\n+/, '').replace(/\n+$/, '').replace(/^$/, '\n');
                                        $bbcode += '[/code]';
@@ -1852,7 +1852,7 @@ RedactorPlugins.wbbcode = function() {
                                        codeBox.attr('data-highlighter', $selectedHighlighter);
                                        
                                        var $headline = __REDACTOR_CODE_HIGHLIGHTERS[$selectedHighlighter];
-                                       var $codeFilename = $.trim($filename.val());
+                                       var $codeFilename = $.trim($filename.val().replace(/['"]/g, ''));
                                        if ($codeFilename) {
                                                $headline += ': ' + WCF.String.escapeHTML($codeFilename);
                                                codeBox.data('filename', $codeFilename);
index 5de18a25c46dc8bd52bf6ec35fa9104c23fc9301..c9d672dc18bd540d1a966837673628ee807592a3 100644 (file)
@@ -1771,13 +1771,13 @@ Erlaubte Dateiendungen: {', '|implode:$attachmentHandler->getFormattedAllowedExt
                <item name="wcf.bbcode.code.filename.description"><![CDATA[Optional: Legen Sie einen anzuzeigenden Dateinamen fest.]]></item>
                <item name="wcf.bbcode.code.highlighter"><![CDATA[Syntax-Hervorherbung]]></item>
                <item name="wcf.bbcode.code.highlighter.description"><![CDATA[Die farbliche Hervorherbung wird im Editor nicht angezeigt.]]></item>
-               <item name="wcf.bbcode.code.highlighter.none"><![CDATA[(Keine Hervorherbung)]]></item>
+               <item name="wcf.bbcode.code.highlighter.none"><![CDATA[(Keine Hervorhebung)]]></item>
                <item name="wcf.bbcode.code.html.title"><![CDATA[HTML-Quellcode]]></item>
                <item name="wcf.bbcode.code.insert"><![CDATA[Quellcode einfügen]]></item>
                <item name="wcf.bbcode.code.java.title"><![CDATA[Java-Quellcode]]></item>
                <item name="wcf.bbcode.code.js.title"><![CDATA[JavaScript-Quellcode]]></item>
                <item name="wcf.bbcode.code.lineNumber"><![CDATA[Start-Zeilennummer]]></item>
-               <item name="wcf.bbcode.code.lineNumber.description"><![CDATA[Optional: Legen Sie den Wert fest ab dem die Zeilennummierung startet.]]></item>
+               <item name="wcf.bbcode.code.lineNumber.description"><![CDATA[Optional: Legen Sie den Wert fest, ab dem die Zeilennummierung startet.]]></item>
                <item name="wcf.bbcode.code.perl.title"><![CDATA[Perl-Quellcode]]></item>
                <item name="wcf.bbcode.code.php.title"><![CDATA[PHP-Quellcode]]></item>
                <item name="wcf.bbcode.code.plain.title"><![CDATA[Quellcode]]></item>