Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search

William769

(55,144 posts)
Sun May 18, 2014, 10:48 AM May 2014

How do you post HTML in a PM here on DU without it actually working?

What I mean is I need to give an example on how to do something in html but when I post the code it does what it's suppose to do (I need to post the code as an example).

Any and all help would be greatly appreciated.



7 replies = new reply since forum marked as read
Highlight: NoneDon't highlight anything 5 newestHighlight 5 most recent replies
How do you post HTML in a PM here on DU without it actually working? (Original Post) William769 May 2014 OP
I have no idea but... mockmonkey May 2014 #1
I think DU uses BBCode not HTML gvstn May 2014 #2
Normally the PRE tag would be used... ChromeFoundry May 2014 #3
I like your sig! n/t PrestonLocke May 2014 #7
You can use the html entity for the open bracket to share coding examples. Make7 May 2014 #4
This. William769 May 2014 #5
You're supposed to use [, not reverse the opening brackets! Make7 May 2014 #6

gvstn

(2,805 posts)
2. I think DU uses BBCode not HTML
Sun May 18, 2014, 12:08 PM
May 2014

On most forums you can add an extra space after the opening bracket of the command and it breaks the command and shows the command as text, but DU seems to understand the command is broken but does not print the text. You could substitute a different bracket in your example and then tell the person to replace the brackets with the square brackets (in this example the proper brackets are on the same keyboard key as the one I used so easy to find and substitute).

{div class="excerpt"}Blocked Quoted Text Here{/div}

ChromeFoundry

(3,270 posts)
3. Normally the PRE tag would be used...
Sun May 18, 2014, 12:35 PM
May 2014

Not sure if DU supports it...

[pre]
<table>
<tr>
<td>this is a test...</td>
</tr>
</table>
[/pre]


Just wrap your HTML in a bracketed PRE tag.

Make7

(8,543 posts)
4. You can use the html entity for the open bracket to share coding examples.
Sun May 18, 2014, 01:21 PM
May 2014

Replace all left square brackets ( &lsqb; ) with its html entity ( &lsqb; ).

[div class="excerpt" style="display:inline-block; margin-left:1em; border:1px solid #bfbfbf; border-radius:0.4615em; box-shadow:-1px -1px 3px #999999 inset;"]&lsqb;font color="blue"]text&lsqb;/font]

&lsqb;font color="blue"]text&lsqb;/font]

Is that what you are looking for? If you have a lot of code, using a simple text editor is helpful because you can use its search and replace function. Hope that helps.

EDIT TO ADD: An easy way to test if what you're doing works is to PM yourself and view the final results. That way you don't end up sending somebody something that is showing up incorrectly.

Also replies to PM's with code examples get interesting because the entities become left square brackets and will make the code execute when it is sent back to you.

William769

(55,144 posts)
5. This.
Sun May 18, 2014, 01:36 PM
May 2014

[button color="green" link="" size="medium" target="_blank" font="georgia" textcolor="#090000" align="left"]Read More [/button]

Original code (although on du it will not put it in the green box, or make it clickable, but good for the example I nee to do).

[button color="green" link="http://www.democraticunderground.com/" size="medium" target="_blank" font="georgia" textcolor="#090000" align="left"]Read More[/button]



ETA: That didn't work.

]button color="green" link="" size="medium" target="_blank" font="georgia" textcolor="#090000" align="left"]Read More]/button]

I changed one of the brackets to get it to post. Thanks for pointing me in the right direction.

Make7

(8,543 posts)
6. You're supposed to use &lsqb;, not reverse the opening brackets!
Sun May 18, 2014, 02:12 PM
May 2014

Perhaps I should have mentioned when you do the same thing in posts on the board if you preview your post, it turns the html entities into the actual characters so when you hit the Post my reply! button from there it executes the code instead of just displaying it. To prevent that, just hit your browser's back (previous page) button to post from the pre-previewed text with the html entities still intact.

Since the DU3 software doesn't support the [button] tag, should I assume this is for another board? If that is the case, I can't say whether or not using html entities in a PM there will work or not - you can always try it and see.

FYI, the html button tag does not support any of the attributes in your example.

I guess whether that button code works as intended depends on if that site is using some non-standard adoption of the tag. If it is simply converting the stuff in brackets to html, it definitely will not work. If it was just some random placeholder example, forget what I just said.

Latest Discussions»Help & Search»Computer Help and Support»How do you post HTML in a...