ID:1970734
 
BYOND Version:509.1308
Operating System:Windows 7 Pro 64-bit
Web Browser:Chrome 46.0.2490.71
Applies to:Webclient
Status: Verified

A member of our crack team of bug testers has verified that this issue is reproducible, and has handed it off to the development team for investigation.
Descriptive Problem Summary:
style is completely ignored in webclient's output when used in links

Numbered Steps to Reproduce Problem:

Code Snippet (if applicable) to Reproduce Problem:
world << "<a href=\"\" style=\"font-size:1;font-family:'Comic Sans MS';text-decoration:none;color:green;\">Test</a>"


Expected Results:
Green text with no underline

Actual Results:
Default link decoration and colors

Does the problem occur:
Every time? Or how often? Yes
In other games? Yes
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur? With other tags like font or bold

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.)

Workarounds:

Lummox JR changed status to 'Verified'
I found out roughly what's happening here, and it's a non-trivial fix. I did make an improvement on the behavior for 509.1309 so that the color will carry through, but I wasn't able to get the text-decoration to carry over.

What's going on is that the text is being parsed, and is sent in a deliberately sanitized form to the client--but the sanitization is a little imperfect in that it can strip some things out. The text-decoration style is being interpreted correctly, but at the time it's applied it sees that there isn't actually any underlining going on, so it doesn't do anything. In theory the correct behavior would be to carry over the whole style attribute, or at least a parsed version of it, at which point the inline style would correctly override the link's default style. (I'm moderately baffled as to why this works correctly in DS, but I think it's because DS looks at styles in a very sequential rather than hierarchical way, where the underline would normally be applied in the very spot where you're telling it not to apply.)

As a workaround for now, I recommend that if you want all your output links not to be underlined, just set text-decoration:none for links in a .dms stylesheet or your default output control's styles. I think either one of those should become the webclient's main stylesheet and therefore should have the effect you want.