how to safely remove this line from list-view

In html code generated by listView there is a part like this:

<div id="yw1" class="list-view">

<div class="keys" style="display:none" title="/t/my-tag"><span>722</span><span>770</span><span>779</span><span>780</span><span>783</span></div>

It is not displayed on page, but in google SERP it is OFTEN showed as page description

eg.

My-tag - [ Translate this page ]

My-tag. 770722779780783. Results 1-5 z 5. … bla bla bla

This is quite ugly and it prevents clicking in this result. How to avoid this thing?

regards,

augustin

Yeah, I was just about to ask the same question, as this line of code took my attention. For what is it for?

BTW, augustin: What is Google SERP and how did you managed to force it to display "bla bla bla"? :] :] :]

The div with the id keys holds the primary keys of the rows displayed in the table…

I just changed the order of rendering… so that first the table content would be rendered and only then the keys - http://code.google.com/p/yii/source/detail?r=2932

Sorry to re-open this old thread, but my question is along similar lines.

What is this keys div for? Is it necessary for some functionality of the list view? I really don’t want it in my page as I don’t expose the primary key of the model for security reasons. I can extend CListView to override run() and not insert the keys, but I’m concerned I will break something.

Thanks

Of course I don’t know your application but generally, if you are hiding IDs “for security reasons”, you have a problem with your security.

If a user shouldn’t see some content with a certain ID, they should not be authorized to view it in the first place.

Where this information is displayed in Google search results, simply add a proper page description using the metatag in the head section. When the page description is missing, Google will use some content from the page instead.