Foros del Web » Programando para Internet » PHP »

tinymce ayuda

Estas en el tema de tinymce ayuda en el foro de PHP en Foros del Web. Hola, tengo un problema con el tinyMCE, pq en el editor pego un HTML que contiene javascript y me lo guarda mal en la base ...
  #1 (permalink)  
Antiguo 07/11/2009, 14:28
 
Fecha de Ingreso: noviembre-2005
Mensajes: 62
Antigüedad: 18 años, 5 meses
Puntos: 0
De acuerdo tinymce ayuda

Hola, tengo un problema con el tinyMCE, pq en el editor pego un HTML que contiene javascript y me lo guarda mal en la base de datos (mysql), el HTML lo pego con el botón de HTML

HTML que pego:

<html>
<head>
<title>::: aaa :::</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-7057224-9");
pageTracker._trackPageview();
} catch(err) {}</script>
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
-->
</style></head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table height="" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
<td align="center" valign="top"><div align="right"><span class="style1">si no puede ver el contenido haga <A href="http://www.aaaa.com.ar/grupo/">click aqui</A></span><br>

</div></td>
</tr>
</table>


</body>


Y en la base se guarda así:


<!-- body { background-color: #FFFFFF; } .style1 { font-family: Arial, Helvetica, sans-serif; font-size: 10px; } .style4 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #666666; } -->
<table id="Table_01" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td align="center" valign="top">
<div>
<p><span class="style1">si no puede ver el contenido haga <a href="http://www.aaa.com.ar/voyage/">click aqui</a></span></p>
</div>
</td>
</tr>
<tr>
<td align="center" valign="top"><span class="style4"><br />LOS PROGRAMAS SON EN BASE DOBLE Y SUJETOS A DISPONIBILIDAD AL MOMENTO DE EFECTUAR LA RESERVA.<br /><br /></span></td>
</tr>
</tbody>
</table>
<!-- End ImageReady Slices -->
<p>

</p>
</html>

Alguien sabe que puede ser???

Gracias!
Saludos.
  #2 (permalink)  
Antiguo 07/11/2009, 14:38
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: tinymce ayuda

supongo que ha de tener un filtro anti-XSS, por eso elimina los scripts...

te sugiero busques en la documentación de TinyMCE al respecto, suerte!!
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #3 (permalink)  
Antiguo 18/01/2010, 07:46
 
Fecha de Ingreso: enero-2010
Mensajes: 15
Antigüedad: 14 años, 3 meses
Puntos: 0
Respuesta: tinymce ayuda

Tengo el mismo problema, si logras solucionarlo por favor publica la solución.
  #4 (permalink)  
Antiguo 18/01/2010, 09:04
 
Fecha de Ingreso: abril-2004
Ubicación: madrid
Mensajes: 31
Antigüedad: 20 años
Puntos: 2
Respuesta: tinymce ayuda

hola a todos,

he investigado un poco y creo que he dado con la solucion en [URL="http://forum.mamboserver.com/showpost.php?p=113533&postcount=10"]este post[/URL]:

para que no se coma los <script>, cuando inicies tinyMCE:

tinyMCE.init({

añade a la siguiente linea:

valid_elements: "*[*]",

quedando:

tinyMCE.init({
valid_elements: "*[*]",


espero que os funcione, un saludo!
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:01.