I would like to use nicEdit to manage a newsletter service by entering text in a form with links and other properties from nicEdit and dispatch it by email.
I use this piece of code:
- Code: Select all
<script type="text/javascript" src="../nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
for(var i=0;i<content.nicInstances.length;i++){content.nicInstances[i].saveContent();}
</script>
<h4><center>Comunicazione Taxi.</center></font></h4>
<form action="mailTaxi.php" method="post">
<textarea name="content" rows="40" cols="60">
</textarea><p>
<input STYLE=" background-color:ad3608; color:ffffff" type="submit" value="Invia">
<input STYLE=" background-color:ad3608; color:ffffff" type="reset" value="Annulla">
</center>
</form>
Yet, when I print the variable content in the handler the links I inserted are shown in the form:
javascript:nicTemp(); instead of the anchor name I entered and moreover, upon been clicked, they lead to a wrong address obtained by prefixing the inserted url with the domain and %22. Also characters ' receive a leading \ to produce \' each time.
Moreover, and this is another problem, when I insert the content of the variable by echoing it inside an ob_start();, the link in the email gets sent stripped of its hyperlink. Carriage returns are the only things to be kept...
What should I do to get rid of the \ and keep the links in the way I inserted them down to the sent mail?
Thanks, Fabrizio

