<optiontype>boolean</optiontype>
<defaultvalue>1</defaultvalue>
</option>
- <option name="external_link_rel_nofollow">
- <categoryname>general.page</categoryname>
- <optiontype>boolean</optiontype>
- <defaultvalue>1</defaultvalue>
- </option>
<option name="external_link_target_blank">
<categoryname>general.page</categoryname>
<optiontype>boolean</optiontype>
// https://github.com/WoltLab/WCF/issues/3330
define('MESSAGE_SIDEBAR_ENABLE_USER_ONLINE_MARKING', 1);
+ // rel=nofollow is always applied to external link since 5.3
+ // https://github.com/WoltLab/WCF/issues/3339
+ define('EXTERNAL_LINK_REL_NOFOLLOW', 1);
+
$filename = WCF_DIR.'options.inc.php';
// create options file if doesn't exist
public static function markLinkAsExternal(\DOMElement $element) {
$element->setAttribute('class', 'externalURL');
- $rel = '';
- if (EXTERNAL_LINK_REL_NOFOLLOW) {
- $rel = 'nofollow';
- }
-
+ $rel = 'nofollow';
if (EXTERNAL_LINK_TARGET_BLANK) {
- if (!empty($rel)) $rel .= ' ';
-
- $rel .= 'noopener noreferrer';
+ $rel .= ' noopener noreferrer';
$element->setAttribute('target', '_blank');
}
-
- if (!empty($rel)) {
- $element->setAttribute('rel', $rel);
- }
+ $element->setAttribute('rel', $rel);
// If the link contains only a single image that is floated to the right,
// then the external link marker is misaligned. Inheriting the CSS class
<item name="wcf.acp.option.enable_debug_mode.description"><![CDATA[Aktiviert ausführliche Fehlerberichte. Diese Option sollte im Live-Betrieb abgeschaltet werden.]]></item>
<item name="wcf.acp.option.enable_production_debug_mode"><![CDATA[Problemanalyse im Live-Betrieb]]></item>
<item name="wcf.acp.option.enable_production_debug_mode.description"><![CDATA[Hängt die aktuelle URL an Datenbankabfragen an, um diese im Log des Datenbankservers einfacher identifizieren zu können.]]></item>
- <item name="wcf.acp.option.external_link_rel_nofollow"><![CDATA[Externe Links mit dem Attribut „rel="nofollow"“ versehen]]></item>
- <item name="wcf.acp.option.external_link_rel_nofollow.description"><![CDATA[Das Attribut „rel="nofollow"“ weist Suchmaschinen an, einen bestimmten Link auf einer Seite zu ignorieren.]]></item>
<item name="wcf.acp.option.external_link_target_blank"><![CDATA[Externe Links in neuem Fenster öffnen]]></item>
<item name="wcf.acp.option.external_link_target_blank.description"><![CDATA[Setzt das Attribut „target="_blank"“ auf externe Links und weist den Browser dadurch an, einen aufgerufenen Link in einem neuen Browser-Fenster zu öffnen.]]></item>
<item name="wcf.acp.option.enable_benchmark"><![CDATA[Benchmark aktivieren]]></item>
<item name="wcf.acp.option.enable_debug_mode.description"><![CDATA[Enables extensive error messages, it should always be disabled in production environments!]]></item>
<item name="wcf.acp.option.enable_production_debug_mode"><![CDATA[Problem analysis in production environments]]></item>
<item name="wcf.acp.option.enable_production_debug_mode.description"><![CDATA[Appends the current URL to database queries to assist looking them up in the database server’s log files.]]></item>
- <item name="wcf.acp.option.external_link_rel_nofollow"><![CDATA[Append the attribute “rel="nofollow"” to all external links]]></item>
- <item name="wcf.acp.option.external_link_rel_nofollow.description"><![CDATA[The attribute “rel="nofollow"” tells search engines to disregard external links.]]></item>
<item name="wcf.acp.option.external_link_target_blank"><![CDATA[Open external links in a new window]]></item>
<item name="wcf.acp.option.external_link_target_blank.description"><![CDATA[Appends the attribute “target="_blank"” to external links, causing the user’s browser to open the link in a new window.]]></item>
<item name="wcf.acp.option.enable_benchmark"><![CDATA[Enable benchmark]]></item>