I was trying to run down an old post where I remembered posting code to answer a question that was asked so I searched for the site on google:

I think the third thread was this:

Notice my post with code. Click toggle plain view and you will see the HTML markup in the code snippet.

You have to click on the link in google. Daniweb looks at the referring URL, sees that it is google, and highlights the search terms from the referring URL.

This is a FF screenshot:

It sure isn't!

I posted that code to two threads this morning before I realized it had markup in it. Not a big deal but I thought I would mention it.

AFAICT, code highlighting on Daniweb works by rendering two DIV's, a syntax highlighted DIV which is created at the server side [i.e. no client side code highlights as used by many forums out there] and a normal DIV which contains the plain text version of the code [no style classes for each and every word etc.] wrapped up in PRE tags [to maintain formatting]. For rendering these two DIV's, the plain text version of the submitted code is used as a base.

When you search a term using Daniweb's search feature, which I guess is powered by Google, the search term highlighted piece of code is used as a reference and *not* the plain text version. Hence, clicking the toggle plain text link does what it should; toggle between the highlighted source code and the base source code used for highlighting; which in this case happens to be "search" enabled markup, something like <strong>Excel</strong>.

IMO, this can be fixed by using the plain text version as the base version and when serving a page which is the result of a search query, apply two levels of processing instead of one. The first level would be server side code formatting and the second would be search term related formatting. If this feature is vBulletin default, there is little that can be done by Dani other than reporting it as a bug. But good observation, BTW. :-)

Marked as something to look into when we upgrade vB to the next version (currently under development, feature freeze on production)

Just wanted to bump this thread now that you have upgraded in case you run out of things on your to-do list!

LOL thanks :-P I'm still working on a combination of emergency bugs and adding missing features. Will get to it by next week most likely.