You are not logged in.

  • Login

1

Tuesday, February 9th 2010, 10:35pm

jQuery -- text() -- HTML-tags werden gefiltert

JavaScript Code

1
2
// add file to the list
				$('<li></li>').appendTo('#example1 .files').text(response);


Das ist der Code.

Und das ist eine mögliche response :P

HTML Code

1
<img src="..">


Und naja das wird in der Enddatei angezeigt

HTML Code

1
&lt;img src=".."&gt;



In der PHP-Datei wird dies nirgendswo gefiltert.

2

Tuesday, February 9th 2010, 10:36pm

Versuche es anstatt text() mal mit html() ;) sollte gehen


Siehe auch hier : http://api.jquery.com/html/

3

Tuesday, February 9th 2010, 10:40pm

Hat geklappt,

Vielen Dank ;)

This post has been edited 1 times, last edit by "Gnah" (Feb 9th 2010, 10:59pm)


4

Tuesday, February 9th 2010, 10:40pm

Kein Problem dafür sind wir doch da :)

Social bookmarks