Bug - Fixed ash print("/anythinghere"); prints blank

xKiv

Active member
Code:
> ash print("/awelr234");


Returned: void

> ash print("<br>/awelr234");

<br>/awelr234
Returned: void

> ash print("./awelr234");

./awelr234
Returned: void

> ash print("/");


Returned: void

> ash print("//kkk");


Returned: void

> ash print("//kkk;");


Returned: void


All I can tell is that this line in ChatBuffer:498 still gets the original string in this.newContent, but doesn't add it to contentElement's data:
Code:
					currentHTML.insertAfterEnd( contentElement, this.newContent );

this is on linux, with
Code:
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1~0.12.10.1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
 

xKiv

Active member
Best I can tell, this is a bug in java ... namely, javax.swing.text.html.parser.Parser.parseContent() has special handling for several characters; among them '/', because it can indicate a closing tag. Problem is, when it isn't part of a closing tag, they forget to treat is *exactly* as a normal character, and certain variables don't get set. And then when the <br> at the end of this.newContent gets processed, they throw away any text before it.

Workaround would probably be to change a line in RuntimeLibrary.print(Interpreter, string):
Code:
		RequestLogger.printLine( parameters );
to
Code:
		RequestLogger.printLine( "<span>" + parameters + "</span>" );
 

Veracity

Developer
Staff member
Now that I have a standalone test program that does what ChatBuffer does, I modified it to reproduce this bug and submitted a bug report to Oracle.

Unlike the multiplying tables issue, there is a workaround for this one, as you point out. I'd probably only insert the span if the text starts with a /.
 
Top