HTML bold not working correctly

If you have searched the other User Creations subforums and an answer to your question has not been found, please post here!

Moderators: dorpond, trevor, Azhrei, Gamerdude

Post Reply
aranginor
Giant
Posts: 131
Joined: Fri Dec 05, 2008 2:32 pm

HTML bold not working correctly

Post by aranginor »

Can anyone tell me why the first bold tag in html does not work?

I have tried the following

Code: Select all

<html>
<body>
<p><b>Text</b></p>
<p><b>Text</b></p>
</body>
</html>
and

Code: Select all

[h: output = "
<html>
<body>
<p><b>Text</b></p>
<p><b>Text</b></p>
</body>
</html>
"]
[r: output]
They both result in:
Text
Text

instead of:
Text
Text


Edit: These results are what happens when the HTML is sent directly to the chat window. However, when it is passed to a dialog/frame it works correctly.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: HTML bold not working correctly

Post by aliasmask »

It has something to do with sending <html> to the chat output. Removing that will fix it. Also, the <p> style is different in chat. You can see the difference here:

Code: Select all

[h: output = "<html><body><p><b>Text</b></p><p><b>Text</b></p></body></html>"]
[r: output]
[dialog("D"):{[R: output]}]
You only need the <html> tag when using html in an input() to tell the parser that it's there. The chat output is already formatted as an html doc. You can tell that when saving the chat output. It's also safe to use in a dialog and frame.

aranginor
Giant
Posts: 131
Joined: Fri Dec 05, 2008 2:32 pm

Re: HTML bold not working correctly

Post by aranginor »

Thanks Alias!!

Post Reply

Return to “Requests for HELLLLP!”