in your ajax success method:
success: function(data)
{
$(data).find("p").each(function(index,element){
var pipe = element.innerHTML.indexOf("|");
if( pipe != -1 ){
element.innerHTML.replace("|","( ");
element.innerHTML += ")";
}
}
//continue with placing data on the page.
}
you could also farm this out into a function so you could call it when the page first loads too
function replacePipe(element)
{
$(element).find("p").each(function(index,el){
var pipe = el.innerHTML.indexOf("|");
if( pipe != -1 ){
el.innerHTML.replace("|","( ");
el.innerHTML += ")";
}
}
}
which would make the ajax success look like this:
success: function(data)
{
replacePipe(data);
//place data, perhaps $(tar).html(data);
}
and you could do this onload too
window.onload = function(){
replacePipe(document.body);
};