diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php
index 8483aedfa38..aa466fa71d8 100644
--- a/htdocs/core/class/doleditor.class.php
+++ b/htdocs/core/class/doleditor.class.php
@@ -173,6 +173,9 @@ class DolEditor
if (empty($conf->global->FCKEDITOR_ENABLE_PDF)) {
$pluginstodisable .= ',exportpdf';
}
+ if (!empty($conf->global->MAIN_DISALLOW_URL_INTO_DESCRIPTIONS)) {
+ $this->uselocalbrowser = 0; // Can't use browser to navigate into files. Only links with "
global->FCKEDITOR_ENABLE_SCAYT_AUTOSTARTUP)) {
$scaytautostartup = 'scayt_autoStartup: true,';
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 201bb837473..5da65a33320 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -7635,18 +7635,19 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = '
} while ($oldstringtoclean != $out);
// Check the limit of external links that are automatically executed in a Rich text content. We count:
- // '
+ // '
, we can only accept "
$reg = array();
- preg_match_all('/(
getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT", 1000)) {
+ $tmpout = preg_replace('/
getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT", 1000)) {
$out = 'ErrorTooManyLinksIntoHTMLString';
}
//
if (!empty($conf->global->MAIN_DISALLOW_URL_INTO_DESCRIPTIONS) || $check == 'restricthtmlnolink') {
- if ($nbextlink > 0) {
+ if ($nblinks > 0) {
$out = 'ErrorHTMLLinksNotAllowed';
}
}