I have the following code:
// DM
src << output("Honk!", "main_output");
...
// DMS
<script>
{
fn:
{
output: function(obj)
{
if (obj.hasOwnProperty("text"))
{
try
{
alert(obj.text);
}
catch (ex)
{
alert(ex.message);
}
}
}
}
}
</script>
In the webclient I receive the following alert:
Honk!<br/>
Numbered Steps to Reproduce Problem:
1. Use the above code to send a message.
2. A <br/> is appended to the string.
Expected Results:
The message is sent as-is.
Actual Results:
The message is altered.
Does the problem occur:
Every time? Or how often?
Every time.
In other games?
Unknown.
In other user accounts?
Unknown.
On other computers?
Unknown.
When does the problem NOT occur?
The problem always occurs.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Unknown - first time I'm using the webclient properly.
Workarounds:
Manually strip the BR tag from the string. This is not desirable as the current behavior may change in the future. The string should not be manipulated at all but passed on directly, and it should be up to the skin developer to decide what to do.