HTML comment based tokens in hook_views_post_render() I am trying to figure out why my HTML comment based tokens are not getting replaced in hook_views_post_render(). I have a view where I've got a couple of fields, let's say, nid and the content title. I want to replace the title with something else.

So, I've edited the content title and checked the box to rewrite the output of the field and added something like this: 

&lt;!--something--&gt;


Now, in hook_views_post_render() I am doing this:

strtr($output, array('&lt;!--something--&gt;' =&gt; 'my changed output');


But the problem is, nothing happens. For some reason, $output doesn't have the HTML comment, it's like it is being stripped out. I have specifically looked at the options for the field in my view and I don't have any of the checkboxes checked that strips out the HTML. I can add other html in $output and they all work fine, so there is no problem with the html going through. So, I am wondering what the issue is. Would appreciate any help on this.
It is being stripped -- rewritten views field output still gets run through filter_xss_admin(), which strips out any HTML tag-like construct that isn't in the default allowed_tags list.

Instead of using a &lt;!--something--&gt; format, try using [SOMETHING] instead.