thanks for your help; worked perfectly.
The input field that contained the character '|' many times was on the insert page from a previous page that had a form action taking it to the insert page.
So i used the urlencode this way
<input name="hiddenCad03" id="hiddenCado3" type="hidden" value="<?php echo urlencode((isset($_POST["heading02"]))?$_POST["heading02"]:"") ?>" />
That field was inserted into the database encoded and then when i wanted to pull that information from the database and display it on another page i used a recordset this way
<?php echo urldecode($row_rs_unclassified['ad_header']); ?>