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

Luxembourg

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
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.

Cheers,

Dan Bruhn

NetPro Community Manager

line break

hyperlink

Italics

bold

paragraph

strong

underline

font

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

Luxembourg

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

Dan,

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

http://forum.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Network%20Infrastructure&topic=WAN%2C%20Routing%20and%20Switching&CommCmd=MB%3Fcmd%3Dpass_through%26location%3Doutline%40%5E1%40%40.2cbf33a6/6#selected_message

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

Kevin Dorrell

Luxembourg

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

Dan,

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.

Thanks

Kevin Dorrell

Luxembourg

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

Kevin,

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.

Cheers,

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 172.16.144.0 0.0.7.255</p><p> no auto-summary</p><p>!</p><p>router eigrp 10</p><p> network 172.16.61.0 0.0.0.255</p><p> network 172.16.101.0 0.0.0.255</p><p> no auto-summary</p><p>!</p><p>router ospf 10</p><p> router-id 172.16.101.1</p><p> log-adjacency-changes</p><p> area 25 nssa</p><p> network 172.16.12.0 0.0.0.255 area 25</p><p> network 172.16.241.0 0.0.0.255 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 172.16.104.1</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    172.16.146.10            0    100      0 10 i</p><p>*>                  172.16.146.10            0             0 10 i</p><p>*> 20.20.20.0/24    172.16.200.7                           0 100 20 i</p><p>* i                 172.16.241.2             0    100      0 100 20 i</p><p>* i60.60.60.0/24    172.16.146.6             0    100      0 600 i</p><p>*>                  172.16.146.6             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

Luxembourg

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.

Thanks..Shanti

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 10.210.11.19

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

*> 10.113.1.0/24 12.85.70.101 0 7018 7018 i

*> 10.117.2.0/24 12.85.70.101 0 7018 7018 i

*> 10.117.3.0/24 12.85.70.101 0 7018 7018 i

*> 10.118.4.0/24 12.85.70.101 0 7018 7018 i

*> 10.140.0.0/14 10.100.0.126 3072 32768 i

*> 10.201.1.0/24 12.85.70.101 0 7018 7018 i

*> 10.201.2.0/24 12.85.70.101 0 7018 7018 i

I was thinking that setting the font would help.

Actions

This Discussion