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:
<!--something-->
Now, in hook_views_post_render() I am doing this:
strtr($output, array('<!--something-->' => '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.