Testweb Posted February 11, 2016 Share Posted February 11, 2016 (edited) Переменная содержит "<textarea></textarea>", содержимое этой переменной необходимо вывести в теге<textarea>тут</textarea> Получается так, что тег </textarea> в переменной, перекрывает (родителя)текстовое поле в которое необходимо поместить содержимое переменной. Как исправить, через что пропустить содержимое переменной? Edited February 11, 2016 by Testweb Link to comment Share on other sites More sharing options...
siv1987 Posted February 11, 2016 Share Posted February 11, 2016 Через ничто. Что мешает удалить эти теги? С функцией замены в php я надеюсь знакомы. Link to comment Share on other sites More sharing options...
Testweb Posted February 11, 2016 Author Share Posted February 11, 2016 Зачем их удалять или вы имеeте ввиду экранировать? Link to comment Share on other sites More sharing options...
Testweb Posted February 11, 2016 Author Share Posted February 11, 2016 Нет экранирование это не то... Link to comment Share on other sites More sharing options...
Testweb Posted February 12, 2016 Author Share Posted February 12, 2016 Да что вы спите? Link to comment Share on other sites More sharing options...
Testweb Posted February 12, 2016 Author Share Posted February 12, 2016 Что делать? Link to comment Share on other sites More sharing options...
newbie Posted February 12, 2016 Share Posted February 12, 2016 Что делать?Идите тоже спать.$var = "<textarea>Text</textarea>"; <textarea>{$var}</textarea> Link to comment Share on other sites More sharing options...
Testweb Posted February 12, 2016 Author Share Posted February 12, 2016 Пытаюсь пропустить на выходе html$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' ); $editor = new $classToLoad(); $editor->setLegacyMode( false ); $editor->setIsHtml( false ); $editor->process($session['post']);все равно перекрывает$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser' ); $parser = new $classToLoad(); $parser->set( array( 'memberData' => $this->memberData, 'parseBBCode' => 1, 'parseArea' => 'topics', 'parseHtml' => 0, 'parseEmoticons' => 1 ) ); $parser->display($session['post']);Тоже перекрывает родительский тег, что делать? Link to comment Share on other sites More sharing options...
Testweb Posted February 12, 2016 Author Share Posted February 12, 2016 При сохранении пропускаю через$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser' ); $parser = new $classToLoad(); $parser->set( array( 'memberData' => $this->memberData, 'parseBBCode' => 1, 'parseArea' => 'topics', 'parseHtml' => 0, 'parseEmoticons' => 1 ) ); $parser->display($session['post']); В бд сохраняет html в исходном виде. Link to comment Share on other sites More sharing options...
Testweb Posted February 12, 2016 Author Share Posted February 12, 2016 (edited) Как пропарсить чистый html при сохранении или на выходе. Как? Edited February 12, 2016 by Testweb Link to comment Share on other sites More sharing options...
Testweb Posted February 12, 2016 Author Share Posted February 12, 2016 Пропустил через htmlspecialchars, работает, но теперь если пропускать через eval на выходе. Отображается код, браузер его не читает. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now