jung6717 / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

Copy as HTML confused by angle brackets in code #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. write a program that includes some html markup, or text that could be
confused to be markup. #include lines that use angle brackets fall into
this category.

2. select the program and choose "Copy as HTML".

3. paste the html into a file and observe the undesired behavior with a web
browser.

What is the expected output? What do you see instead?

I expected a colorized version of this program:

void loop() {
  Serial.print("<h1>hello world</h1>");
}

Instead I got a display with a giant heading in the middle of it. I've
attached a snapshot of the output.

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?

I am using 0016 for the mac, downloaded today.

Please provide any additional information below.

I believe that the "Copy as HTML" commands needs to do more escaping, or
that the escaping it is doing is getting lost somehow.

Original issue reported on code.google.com by ward.cun...@gmail.com on 7 Jun 2009 at 10:34

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dmel...@gmail.com on 15 Jun 2009 at 8:04

GoogleCodeExporter commented 9 years ago

Original comment by dmel...@gmail.com on 15 Jun 2009 at 8:31

GoogleCodeExporter commented 9 years ago
Proposed patch. My fix isn't the prettiest (the code it's inserted in is not the
prettiest either), but it seems to work.

PS- new here.

Original comment by progma...@gmail.com on 31 Jul 2009 at 4:11

Attachments:

GoogleCodeExporter commented 9 years ago
This also breaks simple "#include <filename>" statements.

Original comment by wes...@gmail.com on 28 Jul 2010 at 12:59

GoogleCodeExporter commented 9 years ago
Here is a slight improvement to the patch, so it doesn't do html substitutions 
for Copy-to-Forum.  This also patches all 3 places that process characters.

Original comment by paul.sto...@gmail.com on 17 Nov 2010 at 12:14

Attachments:

GoogleCodeExporter commented 9 years ago
https://github.com/arduino/Arduino/commit/06d3d8514363824b5766e26d03d15491178309
5f

Original comment by dmel...@gmail.com on 17 Nov 2010 at 3:53