Google Docs and the <string> tag

I was debugging some problems quoting a piece of a Google Doc article when I noticed something funny in their HTML source, an apparent string bogon. For example:

<pre> List&lt;String&gt;<string> ls = ... ;<br/> Collections.sort(ls, new Comparator&lt;String&gt;() {<br/> public int compare(String s1, String s2) {<br/> return s1.length() - s2.length();<br/> }<br/> });<br/></string></pre>

In context, I think this is really a tag, not a badly escaped piece of the source document. A little googling didn’t find any information about it. I’m fairly sure this was never a real HTML tag or a browser extension, though I could have missed one somewhere. Can anyone shed some light on this?

Is this unique to this one page, or does this appear in other Google Docs pages as well? Does anyone have links to any other public Google docs pages? I couldn’t find any, which is in itself a little surprising. Are only Google employees allowed to make their docs public from Google servers>

I tried editing a page or two myself, and I wasn’t able to make this tag appear. Perhaps it was just manually inserted by the authors for their own purposes?

FWIW, the page in question is not well-formed HTML or XHTML. However, aside from this tag it’s pretty standard HTML, though it does overuse the br element.

2 Responses to “Google Docs and the <string> tag”

  1. mike nicholaides Says:

    maybe it’s something that their XSL stylesheet didn’t take care of properly?

  2. Ed Davies Says:

    Sort of related: the title of this page shows the word “string” neatly wrapped in angle brackets just like a well behaved HTML/XML tag.

    On Cafe au Lait, however, it shows with an ugly mess of character entities before and after it. Looking at the source it appears some ampersands got escaped when they shouldn’t have. Is this not slightly embarrasing (though perhaps not quite as much as it would be on Cafe con Leche)?

    As for the quoted source in this article: I’m not sure what you mean was originally there – the word “string” appears twice, once initial capped and once not…

Leave a Reply