<category name="message.general.edit">
<parent>message.general</parent>
</category>
+ <category name="message.general.image">
+ <parent>message.general</parent>
+ </category>
<category name="message.attachment">
<parent>message</parent>
</option>
<!-- /message.general.share -->
+ <!-- message.general.image -->
+ <option name="image_allow_external_source">
+ <categoryname>message.general.image</categoryname>
+ <optiontype>boolean</optiontype>
+ <defaultvalue>0</defaultvalue>
+ </option>
+ <!-- /message.general.image -->
+
<!-- message.censorship -->
<option name="enable_censorship">
<categoryname>message.censorship</categoryname>
<?php
namespace wcf\system\bbcode;
+use wcf\system\application\ApplicationHandler;
use wcf\util\StringUtil;
/**
}
if ($parser->getOutputType() == 'text/html') {
+ if (!IMAGE_ALLOW_EXTERNAL_SOURCE && !ApplicationHandler::getInstance()->isInternalURL($src)) {
+ return '[IMG:<a href="'.$src.'">'.$src.'</a>]';
+ }
+
$float = '';
if (isset($openingTag['attributes'][1])) {
$float = $openingTag['attributes'][1];
<item name="wcf.acp.option.category.general.payment.paidSubscription"><![CDATA[Bezahlte Mitgliedschaften]]></item>
<item name="wcf.acp.option.google_maps_api_key"><![CDATA[Browser-API-Schlüssel]]></item>
<item name="wcf.acp.option.google_maps_api_key.description"><![CDATA[Google stellt <a href="{@$__wcf->getPath()}acp/dereferrer.php?url={'https://developers.google.com/maps/documentation/javascript/get-api-key'|rawurlencode}" class="externalURL">hier</a> eine ausführliche Anleitung bereit, wie Sie einen API-Schlüssel erstellen können.]]></item>
+ <item name="wcf.acp.option.category.message.general.image"><![CDATA[Bilder]]></item>
+ <item name="wcf.acp.option.image_allow_external_source"><![CDATA[Bilder von externen Seiten erlauben]]></item>
</category>
<category name="wcf.acp.package">
<item name="wcf.acp.option.category.general.payment.paidSubscription"><![CDATA[Paid Subscriptions]]></item>
<item name="wcf.acp.option.google_maps_api_key"><![CDATA[Browser API Key]]></item>
<item name="wcf.acp.option.google_maps_api_key.description"><![CDATA[Google provides a detailed description on how to get an API key <a href="{@$__wcf->getPath()}acp/dereferrer.php?url={'https://developers.google.com/maps/documentation/javascript/get-api-key'|rawurlencode}" class="externalURL">here</a>.]]></item>
+ <item name="wcf.acp.option.category.message.general.image"><![CDATA[Images]]></item>
+ <item name="wcf.acp.option.image_allow_external_source"><![CDATA[Allow images from external sites]]></item>
</category>
<category name="wcf.acp.package">