I did jsFiddle to do this, just put your CSV test in the HTML field and run the script, the content that you paste into the TracWiki page will be in the Result field.
In case something happens with jsFiddle, here is the JavaScript I used (I probably didn't need to use jQuery, but it was faster for me to think about how to do non-jQuery:
var csv = $('body').html().trim(); csv = csv.replace(/,/g, "||"); csv = csv.replace(/$/gm, "||<br />"); csv = csv.replace(/^/gm, "||");
source share