HTML </code> tag

Unanswered Question
Nov 12th, 2007

I would like to be able to use the <code> tag </code> in my posting so that listings and router output does not look so garbled.

Kevin Dorrell


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Collin Clark Thu, 11/29/2007 - 09:30

Ditto, however with some restriction so there aren't posts with size 56 font colored red because someone thinks there message is more important than everyone else's. Maybe only people who haved earned a certain badge have the ability to HTML post.

Daniel Bruhn Tue, 01/15/2008 - 06:56

Attached is a list of the current HTML code allowed in NetPro posts. As Collin stated we've been selective on what tags we allow in order to keep the site looking clean. After discussing with our IT team we can add the code Kevin has suggested. It will be active in our next release (likely a week or two). If anyone else has a suggestion we will investigate its effect and usefulness for NetPro.


Dan Bruhn

NetPro Community Manager

line break








code (launching in next release)

Kevin Dorrell Tue, 01/15/2008 - 08:11

Thank you Dan, that will be a great help.

The best I can do now is "& n b s p", but they get stripped if I edit (which I do more than I should!)

Kevin Dorrell


Collin Clark Tue, 01/15/2008 - 08:54

Very nice Dan, thanks. I would like to see teletype (monospaced) text too.

UPDATE: Sorry looks like 'code' does that!

Kevin Dorrell Wed, 01/16/2008 - 02:07


Will the code tag be retrospective? That is, if there is already a posting such as:

will the posting look better once the code tag is implemented?

Kevin Dorrell


Kevin Dorrell Thu, 01/17/2008 - 02:52


If you will excuse me, I would just like to check out the existing tags.

I am not entirely sure what the line break does.

hyperlinks are obvious, and are automatic in many cases.

This is the italic font.

This is the bold font.

I put in a new paragraph, just to show it.

On my browser, the font changes here for no apparent reason. I didn't do it.

This is for strong words. It does not seem to work.

This is to underline a word.

The font tag sounds dangerous unless you restrict what people are allowed to do with it. I strongly agree with ceclark on this one.

It looks like I could use Courrier for my listings if only the software didn't strip the leading spaces.

I am looking forward to being able flag my router listings as code so that they don't get reformatted.


Kevin Dorrell


Daniel Bruhn Wed, 02/06/2008 - 06:28


Here is what I've heard from IT regarding your questions...

1. Code tag implementation will apply to all the existing posts too

2. We will take off "font" tag

3. Line break just adds a new line

Code tag was fully deployed on all our servers last night so it should now be live.


Dan Bruhn

NetPro Community Manager

Kevin Dorrell Wed, 02/06/2008 - 09:42

Dan, that sounds great. So if I post a fragment of a config, it should look like the original, like this:

</p><p>router eigrp 100</p><p> network</p><p> no auto-summary</p><p>!</p><p>router eigrp 10</p><p> network</p><p> network</p><p> no auto-summary</p><p>!</p><p>router ospf 10</p><p> router-id</p><p> log-adjacency-changes</p><p> area 25 nssa</p><p> network area 25</p><p> network area 25</p><p>!</p><p>

That's better. Thanks. Just one minor problem: it is still stripping out the leading spaces so we lose the indent. Let's see what it does to a BGP table:

</p><p>! R4#show ip bgp</p><p></p><p>BGP table version is 5, local router ID is</p><p>Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,</p><p>              r RIB-failure, S Stale</p><p>Origin codes: i - IGP, e - EGP, ? - incomplete</p><p></p><p>   Network          Next Hop            Metric LocPrf Weight Path</p><p>* i10.10.10.0/24            0    100      0 10 i</p><p>*>                    0             0 10 i</p><p>*>                           0 100 20 i</p><p>* i                    0    100      0 100 20 i</p><p>* i60.60.60.0/24             0    100      0 600 i</p><p>*>                     0             0 600 i</p><p>

No, I'm afraid it has stripped out the multiple spaces as well, so the tabulation does not work.

Kevin Dorrell


sguntupa Tue, 02/12/2008 - 09:05

Hi Kevin

I think "CODE" tag do not honor the layout of the text (like spaces). HTML special characters have to be escaped if you want them to be working inside code tag, like you did using & n b s p ;.

"PRE" tag is one way to preserve the exact formatting (indentation, spaces) of the text. However, "PRE" tag is not allowed on the forums pages, as it could potentially disturb the page layout.


IT Engineer

NetPro Team

Collin Clark Tue, 02/12/2008 - 09:10

Here is my test

sh ip bgp

BGP table version is 438, local router ID is

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

*> 0 7018 7018 i

*> 0 7018 7018 i

*> 0 7018 7018 i

*> 0 7018 7018 i

*> 3072 32768 i

*> 0 7018 7018 i

*> 0 7018 7018 i

I was thinking that setting the font would help.


This Discussion