Browse Source

Added support for basic HTML (+ Textile) formating and a WYSIWYG editor.

pecesama 18 years ago
parent
commit
47c7bfca99

+ 5 - 5
admin/bm.php View File

55
 		if (!get_magic_quotes_gpc()) {	
55
 		if (!get_magic_quotes_gpc()) {	
56
 			$_POST["title"] = addslashes($_POST["title"]);
56
 			$_POST["title"] = addslashes($_POST["title"]);
57
 			$_POST["description"] = addslashes($_POST["description"]);
57
 			$_POST["description"] = addslashes($_POST["description"]);
58
-		}	
58
+		}
59
+		
60
+		$textile = new Textile();
59
 		
61
 		
60
-		$_POST["title"] = strip_tags($_POST["title"]);
61
-		$_POST["description"] = strip_tags($_POST["description"]);
62
+		$_POST["title"] = $textile->TextileThis(removeBadTags($_POST["title"]));
63
+		$_POST["description"] = $textile->TextileThis(removeBadTags($_POST["description"]));
62
 		
64
 		
63
 		if ($tumble->addPost($_POST)) {
65
 		if ($tumble->addPost($_POST)) {
64
-			//header("Location: ".$conf->urlGelato."/admin/index.php?added=true");
65
-			//die();
66
 			$input = array("{type}");
66
 			$input = array("{type}");
67
 			$output = array("1");
67
 			$output = array("1");
68
 			
68
 			

+ 6 - 3
admin/comments.php View File

22
 	
22
 	
23
 if(isset($_POST["btnAdd"]))	{		
23
 if(isset($_POST["btnAdd"]))	{		
24
 	unset($_POST["btnAdd"]);
24
 	unset($_POST["btnAdd"]);
25
-	$_POST["username"] = strip_tags($_POST["username"]);
26
-	$_POST["email"] = strip_tags($_POST["email"]);	
27
-	$_POST["web"] = strip_tags($_POST["web"]);
25
+	
26
+	$textile = new Textile();
27
+	
28
+	$_POST["username"] = $textile->TextileThis(removeBadTags($_POST["username"]));
29
+	$_POST["email"] = $textile->TextileThis(removeBadTags($_POST["email"]));
30
+	$_POST["web"] = $textile->TextileThis(removeBadTags($_POST["web"]));
28
 		
31
 		
29
 	if (isset($_POST["id_comment"])) {
32
 	if (isset($_POST["id_comment"])) {
30
 		if ($isAdmin) {
33
 		if ($isAdmin) {

+ 15 - 7
admin/index.php View File

66
 		if (!get_magic_quotes_gpc()) {	
66
 		if (!get_magic_quotes_gpc()) {	
67
 			$_POST["title"] = addslashes($_POST["title"]);
67
 			$_POST["title"] = addslashes($_POST["title"]);
68
 			$_POST["description"] = addslashes($_POST["description"]);
68
 			$_POST["description"] = addslashes($_POST["description"]);
69
-		}	
69
+		}		
70
 		
70
 		
71
-		$_POST["title"] = strip_tags($_POST["title"]);
72
-		$_POST["description"] = strip_tags($_POST["description"]);
71
+		$textile = new Textile();
73
 		
72
 		
73
+		$_POST["title"] = $textile->TextileThis(removeBadTags($_POST["title"]));
74
+		$_POST["description"] = $textile->TextileThis(removeBadTags($_POST["description"]));
74
 		
75
 		
75
 		if (isset($_POST["id_post"])) {
76
 		if (isset($_POST["id_post"])) {
76
 			$tumble->modifyPost($_POST, $_POST["id_post"]);
77
 			$tumble->modifyPost($_POST, $_POST["id_post"]);
109
 		Lightbox.fileLoadingImage = "css/images/loading.gif";
110
 		Lightbox.fileLoadingImage = "css/images/loading.gif";
110
 		Lightbox.fileBottomNavCloseImage = "css/images/closelabel.gif";		
111
 		Lightbox.fileBottomNavCloseImage = "css/images/closelabel.gif";		
111
 		</script>
112
 		</script>
113
+<?php
114
+		if($conf->richText) {
115
+?>
116
+        	<script src="<?php echo $conf->urlGelato;?>/admin/scripts/nicEdit.js" type="text/javascript"></script>
117
+			<script type="text/javascript">
118
+                 bkLib.onDomLoaded(nicEditors.allTextAreas);
119
+            </script>
120
+<?php
121
+		}
122
+?>
112
 		<style type="text/css" media="screen">	
123
 		<style type="text/css" media="screen">	
113
 			@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
124
 			@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
114
 			@import "<?php echo $conf->urlGelato;?>/admin/css/lightbox.css";
125
 			@import "<?php echo $conf->urlGelato;?>/admin/css/lightbox.css";
328
 					if ($tumble->contarRegistros()>0) {				
339
 					if ($tumble->contarRegistros()>0) {				
329
 						while($register = mysql_fetch_array($rs)) {			
340
 						while($register = mysql_fetch_array($rs)) {			
330
 							$formatedDate = gmdate("M d", strtotime($register["date"])+transform_offset($conf->offsetTime));
341
 							$formatedDate = gmdate("M d", strtotime($register["date"])+transform_offset($conf->offsetTime));
331
-							$permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";							
332
-							
333
-							$textile = new Textile();				
334
-							$register["description"] = $textile->TextileThis($register["description"]);
342
+							$permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
335
 							
343
 							
336
 							$register["title"] = stripslashes($register["title"]);
344
 							$register["title"] = stripslashes($register["title"]);
337
 							$register["description"] = stripslashes($register["description"]);
345
 							$register["description"] = stripslashes($register["description"]);

File diff suppressed because it is too large
+ 55 - 0
admin/scripts/nicEdit.js


BIN
admin/scripts/nicEditorIcons.gif View File


+ 56 - 39
api.php View File

14
 <?php
14
 <?php
15
 	header("Content-type: text/xml; charset=utf-8");	
15
 	header("Content-type: text/xml; charset=utf-8");	
16
 	
16
 	
17
-	require(dirname(__FILE__)."/config.php");
18
-	include("classes/configuration.class.php");
19
-	include("classes/gelato.class.php");
20
-	include("classes/textile.class.php");
21
 	$isFeed = true;
17
 	$isFeed = true;
22
 	$tumble = new gelato();
18
 	$tumble = new gelato();
23
 	$conf = new configuration();
19
 	$conf = new configuration();
29
 	
25
 	
30
 	if (isset($_GET["action"]) && $_GET["action"] == "read") {
26
 	if (isset($_GET["action"]) && $_GET["action"] == "read") {
31
 		if (isset($_GET["start"])) { $start = $_GET["start"]; } else { $start = 0; }
27
 		if (isset($_GET["start"])) { $start = $_GET["start"]; } else { $start = 0; }
32
-		if (isset($_GET["num"])) { $num = $_GET["num"]; } else { $num = 20; }
33
-		if (isset($_GET["type"])) { $type = $_GET["type"]; } else { $type = null; }
34
-		if ($num > 50) { $num = 50; }		
28
+		if (isset($_GET["total"])) { $total = $_GET["total"]; } else { $total = 20; }
29
+		if (isset($_GET["type"])) { $hasType = true; } else { $hasType = false; }
30
+		if ($total > 50) { $total = 50; }		
35
 ?>		
31
 ?>		
36
 		<tumblelog name="<?php echo $_SESSION["user_login"];?>" timezone="<?php echo $conf->offsetCity;?>" title="<?php echo $conf->title;?>"><?php echo $conf->description;?></tumblelog>	
32
 		<tumblelog name="<?php echo $_SESSION["user_login"];?>" timezone="<?php echo $conf->offsetCity;?>" title="<?php echo $conf->title;?>"><?php echo $conf->description;?></tumblelog>	
37
 
33
 
38
 <?php
34
 <?php
39
-		switch ($type) {
35
+		switch ($hasType) {
40
 			case "post":
36
 			case "post":
41
 				$_GET["type"] = "1";
37
 				$_GET["type"] = "1";
42
 				break;
38
 				break;
59
 				$_GET["type"] = "7";
55
 				$_GET["type"] = "7";
60
 				break;								
56
 				break;								
61
 		}
57
 		}
62
-		$rs = $tumble->getPosts($num, $start);
58
+		$rs = $tumble->getPosts($total, $start);
63
 		if ($tumble->contarRegistros()>0) {
59
 		if ($tumble->contarRegistros()>0) {
64
 ?>
60
 ?>
65
-			<posts start="<?php echo $start; ?>" total="<?php echo $num; ?>">
66
-<?php/*
61
+			<posts start="<?php echo $start; ?>" total="<?php echo $total; ?>">
62
+<?php 
67
 			while($register = mysql_fetch_array($rs)) {
63
 			while($register = mysql_fetch_array($rs)) {
68
-				
69
-				$textile = new Textile();				
70
-				$register["description"] = $textile->TextileThis($register["description"]);
64
+				$desc = $register["description"];
65
+				$url = $conf->urlGelato."/index.php?post=".$register["id_post"];
66
+				$formatedDate = gmdate("D, d M Y H:i:s", strtotime($register["date"])+transform_offset($conf->offsetTime));
71
 				
67
 				
72
 				switch ($register["type"]) {
68
 				switch ($register["type"]) {
73
 					case "1":
69
 					case "1":
74
-						$tit = ($register["title"]=="") ? strip_tags($register["description"]) : $register["title"];
75
-						$desc = $register["description"];
70
+
71
+						$tit = ($register["title"]=="") ? $register["description"] : $register["title"];
72
+?>
73
+						
74
+						<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="regular" date="<?php echo $formatedDate;?>">
75
+							<regular-title><?php echo $tit;?></regular-title>
76
+							<regular-body><?php echo $desc;?></regular-body>
77
+						</post>
78
+<?php						
76
 						break;
79
 						break;
77
 					case "2":
80
 					case "2":
78
-						$tit = ($register["description"]=="") ? "Photo" : strip_tags($register["description"]);
79
-						$desc = "<img src=\"".$register["url"]."\"/>";
81
+						$tit = ($register["description"]=="") ? "Photo" : $register["description"];
82
+?>
83
+						<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="photo" date="<?php echo $formatedDate;?>">
84
+<?php
85
+							$photoPath = str_replace("../", $conf->urlGelato."/", $register["url"]);
86
+?>
87
+                            <photo-caption><?php echo $tit;?></photo-caption>
88
+                            <photo-url><?php echo $photoPath;?></photo-url>                            
89
+                        </post>
90
+<?php
80
 						break;
91
 						break;
81
-					case "3":
82
-						$tit = "\"".strip_tags($register["description"])."\"";
83
-						$tmpStr = ($register["title"]!="") ? "<br /><br /> - <em>".$register["title"]."</em>" : "";
84
-						$desc = "\"".$register["description"]."\"".$tmpStr;
92
+					case "3":						
93
+?>
94
+						<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="quote" date="<?php echo $formatedDate;?>">
95
+							<quote-text><?php echo $desc; ?></quote-text>
96
+							<quote-source><?php echo $register["title"]; ?></quote-source>
97
+						</post>
98
+<?php
85
 						break;
99
 						break;
86
 					case "4":
100
 					case "4":
87
 						$tit = ($register["title"]=="") ? $register["url"] : $register["title"];
101
 						$tit = ($register["title"]=="") ? $register["url"] : $register["title"];
88
-						$tmpStr = ($register["description"]!="") ? "<br /><br /> - <em>".$register["description"]."</em>" : "";
89
-						$desc = "<a href=\"".$register["url"]."\">".$tit."</a>".$tmpStr;
102
+?>
103
+						<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="link" date="<?php echo $formatedDate;?>">
104
+                            <link-text><?php echo $tit; ?></link-text>
105
+                            <link-url><?php echo $register["url"]; ?></link-url>
106
+                        </post>
107
+<?php
90
 						break;
108
 						break;
91
 					case "5":
109
 					case "5":
92
 						$lines = explode("\n", $register["description"]);
110
 						$lines = explode("\n", $register["description"]);
93
 						$line = $lines[0];
111
 						$line = $lines[0];
94
 						$tit = ($register["title"]=="") ? $line : $register["title"];
112
 						$tit = ($register["title"]=="") ? $line : $register["title"];
95
 						$desc = $tumble->formatConversation($register["description"]);
113
 						$desc = $tumble->formatConversation($register["description"]);
114
+?>
115
+						<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="conversation" date="<?php echo $formatedDate;?>">
116
+                            <conversation-title><?php echo $tit; ?></conversation-title>
117
+                            <conversation-text><?php echo $register["description"]; ?></conversation-text>
118
+                            <?php echo $tumble->formatApiConversation($register["description"]); ?>
119
+                        </post>
120
+<?php
96
 						break;
121
 						break;
122
+/*
97
 					case "6":
123
 					case "6":
98
-						$tit = ($register["description"]=="") ? "Video" : strip_tags($register["description"]);
124
+						$tit = ($register["description"]=="") ? "Video" : $register["description"];
99
 						$desc = $tumble->getVideoPlayer($register["url"]);
125
 						$desc = $tumble->getVideoPlayer($register["url"]);
100
 						break;
126
 						break;
101
 					case "7":
127
 					case "7":
102
-						$tit = ($register["description"]=="") ? "MP3" : strip_tags($register["description"]);
128
+						$tit = ($register["description"]=="") ? "MP3" : $register["description"];
103
 						$desc = $tumble->getMp3Player($register["url"]);
129
 						$desc = $tumble->getMp3Player($register["url"]);
104
 						break;
130
 						break;
131
+*/
105
 				}
132
 				}
106
 				$url = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
133
 				$url = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
107
-				$formatedDate = gmdate("D, d M Y H:i:s \G\M\T", strtotime($register["date"])+transform_offset($conf->offsetTime));
108
-?>
109
-
110
-				<item>
111
-					<title><?php echo $tit;?></title>
112
-					<description><![CDATA[<?php echo $desc;?>]]></description>
113
-					<link><?php echo $url;?></link>
114
-					<guid isPermaLink="true"><?php echo $conf->urlGelato."/index.php/post/".$register["id_post"]."/";?></guid>				
115
-					<pubDate><?php echo $formatedDate;?></pubDate>				
116
-				</item>
117
-
118
-<?php	
134
+				$formatedDate = gmdate("D, d M Y H:i:s", strtotime($register["date"])+transform_offset($conf->offsetTime));
119
 			}		
135
 			}		
120
-*/?>
136
+ 
137
+?>
121
 				</posts>
138
 				</posts>
122
 <?php	
139
 <?php	
123
 		}
140
 		}

+ 15 - 1
classes/functions.php View File

17
 	}
17
 	}
18
 	
18
 	
19
 	function codeName() {
19
 	function codeName() {
20
-		return "cioccolato RC1";
20
+		return "vaniglia RC1";
21
 	}
21
 	}
22
 	
22
 	
23
 	function beginsWith($str, $sub) {
23
 	function beginsWith($str, $sub) {
347
 	    }
347
 	    }
348
 	    return $value;
348
 	    return $value;
349
 	}
349
 	}
350
+	
351
+	function removeBadTags($source) {
352
+		$validTags ='<p><ul><li><a><abbr><acronym><blockquote><code><pre><em><i><strike><s><strong><b><br><span><div><img>';
353
+		$source = strip_tags($source, $validTags);
354
+		return preg_replace('/<(.*?)>/ie', "'<'.removeBadAtributes('\\1').'>'", $source);
355
+	}
356
+	
357
+	function removeBadAtributes($sourceTag)
358
+	{
359
+		$badAtributes = 'javascript:|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup|class';
360
+		$sourceTag = stripslashes($sourceTag);
361
+		$sourceTag = preg_replace("/$badAtributes/i", "niceTry", $sourceTag);
362
+		return $sourceTag;
363
+	}
350
 ?>
364
 ?>

+ 18 - 0
classes/gelato.class.php View File

123
 		return $formatedText;
123
 		return $formatedText;
124
 	}
124
 	}
125
 	
125
 	
126
+	function formatApiConversation($text) {
127
+		$formatedText = "";
128
+		
129
+		$lines = explode("\n", $text);
130
+		
131
+		foreach ($lines as $line) {
132
+			$pos = strpos($line, ":") + 1;
133
+			
134
+			$name = substr($line, 0, $pos-1);
135
+			$label = substr($line, 0, $pos);
136
+			$desc = substr($line, $pos, strlen($line));
137
+			
138
+			$formatedText .= "<conversation-line name=\"".$name."\" label=\"".$label."\">".$desc."</conversation-line>\n";
139
+		}
140
+		
141
+		return $formatedText;
142
+	}
143
+	
126
 	function saveMP3($remoteFileName) {
144
 	function saveMP3($remoteFileName) {
127
 		if (getMP3File($remoteFileName)) {
145
 		if (getMP3File($remoteFileName)) {
128
 			return true;
146
 			return true;

+ 0 - 4
classes/mysql_connection.class.php View File

103
 		  
103
 		  
104
 		 $cols .= "$llave,"; 
104
 		 $cols .= "$llave,"; 
105
 		 
105
 		 
106
-		 $valor = htmlspecialchars($valor,ENT_QUOTES);
107
-		 
108
 		 $tipo_col = $this->obtenerTipoCampo($tabla, $llave);  // obtiene el tipo de campo
106
 		 $tipo_col = $this->obtenerTipoCampo($tabla, $llave);  // obtiene el tipo de campo
109
 		 if (!$tipo_col) return false;  // error!
107
 		 if (!$tipo_col) return false;  // error!
110
 		 
108
 		 
158
 		foreach ($datos as $llave=>$valor) {
156
 		foreach ($datos as $llave=>$valor) {
159
 			$sql .= " $llave=";
157
 			$sql .= " $llave=";
160
 			
158
 			
161
-			$valor = htmlspecialchars($valor,ENT_QUOTES);
162
-			
163
 			$tipo_col = $this->obtenerTipoCampo($tabla, $llave);  // obtiene el tipo de campo
159
 			$tipo_col = $this->obtenerTipoCampo($tabla, $llave);  // obtiene el tipo de campo
164
 			if (!$tipo_col) return false;  // error!
160
 			if (!$tipo_col) return false;  // error!
165
 			
161
 			

+ 2 - 7
index.php View File

112
                                 
112
                                 
113
 								$conversation = $register["description"];
113
 								$conversation = $register["description"];
114
 								
114
 								
115
-								$textile = new Textile();				
116
-								$register["description"] = $textile->TextileThis($register["description"]);
115
+								$register["description"] = $register["description"];
117
 
116
 
118
                                 $register["title"] = stripslashes($register["title"]);
117
                                 $register["title"] = stripslashes($register["title"]);
119
                                 $register["description"] = stripslashes($register["description"]);
118
                                 $register["description"] = stripslashes($register["description"]);
212
                 
211
                 
213
 				$conversation = $register["description"];
212
 				$conversation = $register["description"];
214
 				
213
 				
215
-				$textile = new Textile();				
216
-				$register["description"] = $textile->TextileThis($register["description"]);
214
+				$register["description"] = $register["description"];
217
 				
215
 				
218
 				$register["title"] = stripslashes($register["title"]);
216
 				$register["title"] = stripslashes($register["title"]);
219
                 $register["description"] = stripslashes($register["description"]);
217
                 $register["description"] = stripslashes($register["description"]);
306
 					$template->precargarPlantillaConBloque($input, $output, "template_comments", "comments");
304
 					$template->precargarPlantillaConBloque($input, $output, "template_comments", "comments");
307
 
305
 
308
 					while($rowComment = mysql_fetch_assoc($rsComments)) {
306
 					while($rowComment = mysql_fetch_assoc($rsComments)) {
309
-						/*echo "<pre>";
310
-						print_r($rowComment);
311
-						echo "</pre>";*/
312
 						$commentAuthor = ($rowComment["web"]=="") ? $rowComment["username"] : "<a href=\"".$rowComment["web"]."\" rel=\"external\">".$rowComment["username"]."</a>";
307
 						$commentAuthor = ($rowComment["web"]=="") ? $rowComment["username"] : "<a href=\"".$rowComment["web"]."\" rel=\"external\">".$rowComment["username"]."</a>";
313
 						$input = array("{Id_Comment}", "{Comment_Author}", "{Date}", "{Comment}");
308
 						$input = array("{Id_Comment}", "{Comment_Author}", "{Date}", "{Comment}");
314
 						$output = array($rowComment["id_comment"], $commentAuthor, gmdate("d.m.y", strtotime($rowComment["comment_date"])+transform_offset($conf->offsetTime)), $rowComment["content"]);
309
 						$output = array($rowComment["id_comment"], $commentAuthor, gmdate("d.m.y", strtotime($rowComment["comment_date"])+transform_offset($conf->offsetTime)), $rowComment["content"]);

+ 5 - 1
notice.txt View File

1
 == CREDITS==
1
 == CREDITS==
2
-Gelato developers and designers (in chronological order):
2
+gelato CMS developers and designers (in chronological order):
3
 
3
 
4
 Pedro Santana [ http://www.pecesama.net/weblog/ ]
4
 Pedro Santana [ http://www.pecesama.net/weblog/ ]
5
 Jorge Condomi [ http://www.raven.com.ar/ ]
5
 Jorge Condomi [ http://www.raven.com.ar/ ]
11
 = COPYRIGHT NOTICES =
11
 = COPYRIGHT NOTICES =
12
 This product includes code and libraries developed by third parties, which are governed by different licenses.  These components, and their licenses, are listed below.
12
 This product includes code and libraries developed by third parties, which are governed by different licenses.  These components, and their licenses, are listed below.
13
 
13
 
14
+= NicEdit - Micro Inline WYSIWYG =
15
+Copyright 2007 Brian Kirchoff, http://nicedit.com/
16
+NicEdit available under MIT license.
17
+
14
 = jQuery =
18
 = jQuery =
15
 Copyright (c) 2007 John Resig, http://jquery.com
19
 Copyright (c) 2007 John Resig, http://jquery.com
16
 jQuery is available under a dual licensed the MIT and GPL licenses.
20
 jQuery is available under a dual licensed the MIT and GPL licenses.

+ 8 - 10
rss.php View File

37
 
37
 
38
 <?php
38
 <?php
39
 	include("classes/gelato.class.php");
39
 	include("classes/gelato.class.php");
40
-	include("classes/textile.class.php");
41
 	$tumble = new gelato();
40
 	$tumble = new gelato();
42
 	$rs = $tumble->getPosts("20");
41
 	$rs = $tumble->getPosts("20");
43
 	if ($tumble->contarRegistros()>0) {		
42
 	if ($tumble->contarRegistros()>0) {		
44
 
43
 
45
 		while($register = mysql_fetch_array($rs)) {
44
 		while($register = mysql_fetch_array($rs)) {
46
-			$textile = new Textile();				
47
-			$register["description"] = $textile->TextileThis($register["description"]);
45
+			$register["description"] = $register["description"];
48
 			
46
 			
49
 			switch ($register["type"]) {
47
 			switch ($register["type"]) {
50
 				case "1":
48
 				case "1":
51
-					$tit = ($register["title"]=="") ? strip_tags($register["description"]) : $register["title"];
49
+					$tit = ($register["title"]=="") ? $register["description"] : $register["title"];
52
 					$desc = $register["description"];
50
 					$desc = $register["description"];
53
 					break;
51
 					break;
54
 				case "2":
52
 				case "2":
55
 					$photoPath = str_replace("../", $conf->urlGelato."/", $register["url"]);
53
 					$photoPath = str_replace("../", $conf->urlGelato."/", $register["url"]);
56
-					$tit = ($register["description"]=="") ? "Photo" : strip_tags($register["description"]);
54
+					$tit = ($register["description"]=="") ? "Photo" : $register["description"];
57
 					$desc = "<img src=\"".$photoPath."\"/>";
55
 					$desc = "<img src=\"".$photoPath."\"/>";
58
 					break;
56
 					break;
59
 				case "3":
57
 				case "3":
60
-					$tit = "\"".strip_tags($register["description"])."\"";
58
+					$tit = "\"".$register["description"]."\"";
61
 					$tmpStr = ($register["title"]!="") ? "<br /><br /> - <em>".$register["title"]."</em>" : "";
59
 					$tmpStr = ($register["title"]!="") ? "<br /><br /> - <em>".$register["title"]."</em>" : "";
62
 					$desc = "\"".$register["description"]."\"".$tmpStr;
60
 					$desc = "\"".$register["description"]."\"".$tmpStr;
63
 					break;
61
 					break;
73
 					$desc = $tumble->formatConversation($register["description"]);
71
 					$desc = $tumble->formatConversation($register["description"]);
74
 					break;
72
 					break;
75
 				case "6":
73
 				case "6":
76
-					$tit = ($register["description"]=="") ? "Video" : strip_tags($register["description"]);
74
+					$tit = ($register["description"]=="") ? "Video" : $register["description"];
77
 					$desc = $tumble->getVideoPlayer($register["url"]);
75
 					$desc = $tumble->getVideoPlayer($register["url"]);
78
 					break;
76
 					break;
79
 				case "7":
77
 				case "7":
80
-					$tit = ($register["description"]=="") ? "MP3" : strip_tags($register["description"]);
78
+					$tit = ($register["description"]=="") ? "MP3" : $register["description"];
81
 					$desc = $tumble->getMp3Player($register["url"]);
79
 					$desc = $tumble->getMp3Player($register["url"]);
82
 					break;
80
 					break;
83
 			}
81
 			}
84
-			$tit = htmlspecialchars($tit);
85
-			$url = htmlspecialchars($url);
82
+			$tit = strip_tags($tit);
83
+			//$url = htmlspecialchars($url);
86
 			$strEnd=($conf->urlFriendly) ? "/" : "";
84
 			$strEnd=($conf->urlFriendly) ? "/" : "";
87
 			$url = $conf->urlGelato.($conf->urlFriendly?"/post/":"/index.php?post=").$register["id_post"].$strEnd;
85
 			$url = $conf->urlGelato.($conf->urlFriendly?"/post/":"/index.php?post=").$register["id_post"].$strEnd;
88
 			$formatedDate = gmdate("r", strtotime($register["date"])+transform_offset($conf->offsetTime));
86
 			$formatedDate = gmdate("r", strtotime($register["date"])+transform_offset($conf->offsetTime));