1

Just tried to do a cut-and-paste of some C++ code. It renders fine on the forum page, but when you "Toggle Plain Text" to paste it into another document, you get some tags you don't want ('<strong class="highlight">').

std::istream& <strong class="highlight">operator</strong><<(std::istream& FX,complex& A)
  {  
      A.read(FX);
      return FX;
  }
std::ostream& <strong class="highlight">operator</strong>>>(std::ostream& FX,const complex& A)
  {  
      A.write(FX);
      return FX;
  }

Thread is here. See code in post 3.

http://www.daniweb.com/forums/thread239643.html

In addition, see post 1, line 77 without toggling plain text. The "color" tag is there.

I haven't noticed this before. Is this a new problem?


[EDIT]
Strangely, post 3 seems to have fixed itself in the last two minutes. Line 77 is still messed up, at least in my browser.
[/EDIT]

Edited by VernonDozier: n/a

6
Contributors
9
Replies
11
Views
8 Years
Discussion Span
Last Post by happygeek
0

The problem is that the OP put color-tags in his post. Then Adatapost came along and saw that the post needed code-tags and encased the code (with the color-tags in them!) in code-tags. This resulted in tags-in-tags :)

I've edited the post. It should be fine now!

Edited by Nick Evan: n/a

0

No. Its a bug. If you google for daniweb, for example, and then open daniweb, the words in your search are highlighted. If the search term you used appears in code tags, it is escaped to the HTML used for the highlighting.

Try:
http://www.google.co.uk/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-GB%3Aofficial&hs=9vs&q=daniweb+printf&btnG=Search&meta=&aq=f&oq=

Click the first result. which says "printf and three string arguments - Java"

In the link above, every "printf" in the code tags is higlighted.

Edited by jbennet: n/a

0

I clicked the link you provided, went to the second post and saw all the "printf" in bold. When I click "toggle plain text", no HTML code whatsoever is shows. No <strong> or <bold> .
I'm using ff3 on Windows vista 64

0

I clicked the link you provided, went to the second post and saw all the "printf" in bold. When I click "toggle plain text", no HTML code whatsoever is shows. No <strong> or <bold> .
I'm using ff3 on Windows vista 64

It did for me.

<strong class="highlight">String</strong> format = "<strong class="highlight">String</strong> a = %s <strong class="highlight">String</strong> b = %s \n";
System.out.printf(format, a, b);

FF 3.5.5 on windows XP.

0

Ok, maybe I'm not understanding this. Here's the screenshot from the post JBennet described. As you can see I have no tags whatsoever in "plaintext". :-/

[edit] Forgot to add the attachments...

Edited by Nick Evan: n/a

Attachments da.jpg 55.73 KB da2.jpg 55.13 KB
2

This issue was brought up & discussed to some lengths a couple of months back.

> As you can see I have no tags whatsoever in "plaintext"

This problem crops up only when you arrive at Daniweb via a search made on google; all the highlighted terms [in yellow] in the source code show these weird tags when viewed in plain text.

Edited by ~s.o.s~: n/a

0

This problem crops up only when you arrive at Daniweb via a search made on google; all the highlighted terms [in yellow] in the source code show these weird tags when viewed in plain text.

I did! See attachments (now added) in previous post. This is a bit weird or am I going stupid?

1

No, you are not going stupid. :)

I guess I've stumbled upon something. Let's search for the post highlighted in your screen caps [click the first search result]. Now if I click on toggle plain text, I don't see any <strong> tags.

Now let's search for another code snippet & click on the first search result. Here, clicking the toggle plain text link again brings up those HTML tags.

Also another weird thing is that the problem is more prominent with C++ code snippets than with Java code snippets [try searching for "daniweb scanf c" & "daniweb println java"]. Gah, I think trying to make sense of this is like a lost cause, just click on the 'Clear' link which appears at the top of every thread when you arrive at Daniweb from a google search and be done with things.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.