openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 1c39931e704d4a9bbd9459cda1ae7c7ebf3050a9
parent 2ca59d943d4c6a080125db4bd7eb88da35318fcf
Author: Jan Dankert <devnull@localhost>
Date:   Mon, 29 Oct 2012 23:24:24 +0100

Nicht die Methode "htmlentities" verwenden, da diese UTF-8-Zeichen falsch ersetzt.

Diffstat:
Maction/TemplateAction.class.php | 3++-
Mthemes/default/include/html/inputarea.inc.php | 4++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/action/TemplateAction.class.php b/action/TemplateAction.class.php @@ -297,6 +297,7 @@ class TemplateAction extends Action */ function showView() { + header('Content-Type: '.$this->template->mimeType().'; charset='.$this->getCharset() ); $text = $this->template->src; foreach( $this->template->getElementIds() as $elid ) @@ -353,7 +354,7 @@ class TemplateAction extends Action $this->setTemplateVar('elements',$list); - $text = htmlentities( $this->template->src ); + $text = Text::encodeHtml( $this->template->src ); $text = str_replace("\n",'<br/>',$text); foreach( $this->template->getElementIds() as $elid ) diff --git a/themes/default/include/html/inputarea.inc.php b/themes/default/include/html/inputarea.inc.php @@ -1 +1 @@ -<div class="inputholder"><textarea class="<?php echo $attr_class ?>" name="<?php echo $attr_name ?>" ><?php echo htmlentities(isset($$attr_name)?$$attr_name:$attr_default) ?></textarea></div> -\ No newline at end of file +<div class="inputholder"><textarea class="<?php echo $attr_class ?>" name="<?php echo $attr_name ?>" ><?php echo Text::encodeHtml(isset($$attr_name)?$$attr_name:$attr_default) ?></textarea></div> +\ No newline at end of file