Thanks, I'll go with the 3rd option. How can I disable it from CakePHP? What files do I need to edit? Thanks, Vix On Jul 10, 3:58 pm, Lance Willett <[EMAIL PROTECTED]> wrote: > > Thanks, my question is, how can i stop the script from out putting the > > html code when its inserted through the comments box? > > It appears that you are using a JavaScript comment form preview > script, which unfortunately I can't help you with—and if it *is* a > JavaScript issue it's probably not a topic for the CakePHP group here, > anyway. > > Some things to think about are: > 1) What's the purpose of the script? Does it preview the comment, or > is it simply to post the comment without refreshing the page? > 2) Have you tried processing the comment without JavaScript? It's > highly recommended to get the form working as you intend first, then > add scripting later to improve the usability. There are lots of ways > to clean and filter input in PHP, and CakePHP has some nice built-in > tools like Sanitize (http://api.cakephp.org/1.2/class_sanitize.html > andhttp://book.cakephp.org/view/153/data-sanitization). > 3) If you don't want HTML to be allowed in the comment form, you can > filter the input and give an error to the view that says something > like "HTML not allowed." With CakePHP you can do this type of > validation without any JavaScript involved. > > Hope that helps you. > > > here what Iam using: > > <form action="<?php echo $html->url('/THEURL/'.$uid); ?>" method="post"> > > <div class="optional"> > > <?php echo $form->labelTag( 'THEURL', 'Comment' );?> > > <div style="margin-left:174px"> > > <?php echo $html->textarea( 'THEURL', array('class'=> 'editor') > > );?> > > <script type="text/javascript"> > > $.editor.start({ path:'<?php echo $html->url('/Theeditor'); > > ?>/', width: '600px',height: '400px' }); > > $.editor.update(); > > </script> > > In Firefox 3 it doesn't display "editor" instead it shows a black box > > and in that black box, any one can add any type of code they want and > > it will output it. So my question is, how can i stop the black box > > from outputting the codes OR how can I make Firefox 3 display "editor" > > too? > > Thanks, Vix
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
