Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

HTMl in DB gespeichert, ausgabe in Smarty wie ?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
Observer
Smarty n00b


Joined: 03 Oct 2012
Posts: 4

PostPosted: Wed Oct 03, 2012 6:53 pm    Post subject: HTMl in DB gespeichert, ausgabe in Smarty wie ? Reply with quote

Hi, mache noch nicht so lange mit Smarty.
Jetzt suche ich eine Möglichkeit in der DB gespeicherten HTML-Code auszugeben.
Gespeichert wird das aus dem Grund das es ein Gästebuch ist das mit einem WYSYWYG Editor die DB befüllt.

Also Titel und Eintrag.

Den HTML Code für den Eintrag Speicher ich so ab.
Quote:
Hi <img src="http://example.com/04.jpg"><div><br></div><div>Testeintrag</div>


Mein Problem ist wenn ich das so ausgeben lassen will
Quote:
{$gbdata.eintrag}

Dann sieht das allerdings so aus in der Ausgabe :
Quote:
Hi&nbsp;<img src="http://example.com/04.jpg"><div><br></div><div>Testeintrag</div>


Statt es richtig wie HTML zu Parsen Sad
HAt mir da jemand eine Lösung oder einen Lösungsweg dafür ?

MfG
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Oct 03, 2012 7:47 pm    Post subject: Reply with quote

Du must die umgewandelten HTML Sonderzeichen wieder zurück konvertieren.

Siehe http://www.php.net/manual/de/function.htmlspecialchars-decode.php

Code:
{$gbdata.eintrag|htmlspecialchars_decode}
Back to top
View user's profile Send private message
Observer
Smarty n00b


Joined: 03 Oct 2012
Posts: 4

PostPosted: Wed Oct 03, 2012 8:19 pm    Post subject: Reply with quote

Super, danke dir.
Ist aber auch was wo man hätte draufkommen können xD

Wie gesagt danke !

Mfg
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP