Quote:
Originally Posted by xelawho
here's how WolfShade's regex would work on page load:
Code:
<body>
<input id="txt" value="<pre><pre><pre><pre><pre><pre><pre><pre>Testing description field</pre></pre></pre></pre></pre></pre></pre></pre>"/>
<script type="text/javascript">
document.getElementById("txt").value=document.getElementById("txt").value.replace(/\<(\/)*pre\>/g,"")
</script>
</body>
if you have the rewrap bit sorted, you should be fine.
|
Okay thanks again.
Just to confirm that this would be okay?
Code:
<body>
<textarea id="description"> <?php $value['description'] ?> </textarea>
<script type="text/javascript">
document.getElementById("description").value=document.getElementById("description").value.replace(/\<(\/)*pre\>/g,"")
</script>
</body>