How to convert image URLs in Drupal node's fields while rendering? I have developed a new CCK module using Plupload where users can drag and upload images using native HTML5 apis. Since, I do not know how to drag images directly inside CKEditor, what I am doing is that after images are uploaded using plupload's jQuery widget, I show an image instead of a filename from where users can drag that image inside a CKEditor. Its a 2-step drag-n-drop process.

Now, when I drag &amp; drop images into a CKEditor using Chrome, CKEditor generates following code

&lt;p&gt;
    &lt;img src="http://myportal/sites/myportal/files/plupload/p15sjkcj2c1o3koe3hsp19761ep14.jpg" /&gt;&lt;/p&gt;


When I do similar action using Firefox/Safari, CKEditor generates following code

&lt;p&gt;
    &lt;img src="../../sites/myportal/files/plupload/p15sjle1js11r5289aibk0m1n7q3.jpg" /&gt;&lt;/p&gt;


Problem is depending on from where I am viewing the node (views, panel etc), images sometimes shows up and sometime not, because they point to location starting with ../../ and not with http://myportal/.

So, how do I make sure that when Drupal is generating node's view, "../../sites/myportal/files/plupload/p15sjle1js11r5289aibk0m1n7q3.jpg" is expanded or converted to "http://myportal/sites/myportal/files/plupload/p15sjkcj2c1o3koe3hsp19761ep14.jpg"  

One way I  can do this is using jQuery to find all &lt;img&gt; tags with a word 'plupload' in their src attribute , and then changing that attribute with full URL. But, it will slow down display a lot. Any other ideas using Drupal module or custom coding?
You can probably accomplish that with a custom filter involving a regular expression using either Flexfilter or Custom filter.