diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 1fd83bc64..c3507e79e 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -903,6 +903,12 @@ class documentController extends document $obj->content = getModel('editor')->converter($obj, 'document'); } + // Remove iframe and script if not a top adminisrator in the session. + if($logged_info->is_admin != 'Y') + { + $obj->content = removeHackTag($obj->content); + } + // Change not extra vars but language code of the original document if document's lang_code is different from author's setting. if($source_obj->get('lang_code') != Context::getLangType()) { @@ -928,12 +934,6 @@ class documentController extends document } } - // Remove iframe and script if not a top adminisrator in the session. - if($logged_info->is_admin != 'Y') - { - $obj->content = removeHackTag($obj->content); - } - // if temporary document, regdate is now setting if($source_obj->get('status') == $this->getConfigStatus('temp')) $obj->regdate = date('YmdHis');