Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML with %xh%xxStuff%xn #659

Open
brazilofmux opened this issue Mar 24, 2015 · 5 comments
Open

HTML with %xh%xxStuff%xn #659

brazilofmux opened this issue Mar 24, 2015 · 5 comments

Comments

@brazilofmux
Copy link
Owner

Original issue 657 created by brazilofmux on 2011-03-06T15:32:21.000Z:

TinyMUX 2.10.0.3

With HTML:

%xh%xxStuff%xn

becomes:

<B><COLOR # 000000>Stuff</COLOR></B>

And, clients don't necessarily render this as grey.

@brazilofmux
Copy link
Owner Author

Comment #1 originally posted by brazilofmux on 2011-03-06T15:35:17.000Z:

Unlike some of the other HTML-related bugs, this is expected behavior. The interaction between highlight and the 16 ANSI colors is old, but it doesn't translate to interactions between bold and HTML color. The client ultimately has control over how this is rendered. Bold font or intense color? There is no 'intense' tag in HTML.

@brazilofmux
Copy link
Owner Author

Comment #2 originally posted by brazilofmux on 2011-03-06T16:07:23.000Z:

<empty>

@brazilofmux
Copy link
Owner Author

Comment #3 originally posted by brazilofmux on 2012-04-12T19:42:34.000Z:

Another case of the same issue:

%crFoo %chBar%cn becomes <COLOR #BB0000>Foo Bar

@brazilofmux
Copy link
Owner Author

Comment #4 originally posted by brazilofmux on 2012-04-13T00:00:34.000Z:

Another example:

Using a white on black screen, '%xhH%xxO%xyW%xxL%xn' with ANSI or COLOR256 produces grey O and L. The server is asked to use highlight, and it sends it along. The client ultimately assigns the exact colors. Most clients allow the colors to be adjusted or completely rearranged.

However, when set HTML, the output is:

H<COLOR # 000000>O<COLOR #BBBB00>W<COLOR # 000000>L

Since highlight is mapped to , it does not contribute any color to tags. Instead, the client might simply pick a bold font.

So, if we really care about the color aspect of highlight, specify a specific color instead:

%x<#FFFFFF>H%x<# 555555>O%x<#FFFF55>W%x<# 555555>L%x

Then renders correctly on ANSI, COLOR256, and HTML. HTML is:

<COLOR #FFFFFF>H<COLOR # 555555>O<COLOR #FFFF55>W<COLOR # 555555>L

@brazilofmux
Copy link
Owner Author

Comment #5 originally posted by brazilofmux on 2012-04-13T00:03:51.000Z:

Another example:

Using a white on black screen, '%xhH%xxO%xyW%xxL%xn' with ANSI or COLOR256 produces grey O and L. The server is asked to use highlight, and it sends it along. The client ultimately assigns the exact colors. Most clients allow the colors to be adjusted or completely rearranged.

However, when set HTML, the output is:

H<COLOR # 000000>O<COLOR #BBBB00>W<COLOR # 000000>L

Since highlight is mapped to , it does not contribute any color to tags. Instead, the client might simply pick a bold font.

So, if we really care about the color aspect of highlight, specify a specific color instead:

%x<#FFFFFF>H%x<# 555555>O%x<#FFFF55>W%x<# 555555>L%x

This renders correctly on ANSI because the server will generate the highlight itself in an attempt to achieve the requested color. It also renders correctly on COLOR256 and HTML. HTML is:

<COLOR #FFFFFF>H<COLOR # 555555>O<COLOR #FFFF55>W<COLOR # 555555>L

Notice that there are no tags. HTML-enabled clients probably accept and the full-range of together by using a bolded font.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant