Skip to main content
gamedev.net
🔒 Locked

html while editing

Started by rip-off Oct 14, 2005 at 5:35 PM 4 replies 2.3k views
Original Post
rip-off
rip-off
sorry i didnt research this very well as any combination of "edit" and "html" i could think of, when searched, brought back nothing like what im asking here. anyway, when you hit edit( or sometimes on reply i think ) on a post with code, some of the symbols like < are turned into the html equivlent( & l t ; or some such ). just wondering if you want to edit the code used to produce the edit page. just looks very ugly when youre editing code with a & lt;string& gt; in it
rip-off
rip-off
its not permanent, just ugly.

when your editing a post with lots of s (and possibly others) it is hard to look at.

while( i & lt; 7 && i & gt; 8 && ... )

its not immedialty obvious whats wrong...
lemurion
lemurion
IRRC if you use [ source ] and [/ source ] tags then angle brackets won't be altered like this:
/* this is an angle brackets test   < > < > < > < >*/for(i=0; i<10; ++i){  std::cout << i << std::endl;}


hope that helps
matchu
Matt
Oluseyi
Oluseyi
The reason why is as follows: if you had, say, source code in your post that was not enclosed in a [source] blog - say it was enclosed in a [code] block, you needed to delineate the header files using the HTML entities < nad/or >. You didn't need both of them: <header> was perfectly fine. If you didn't do this, the board would see it as HTML code and present it to your browser as such, which would discard the tag as unrecognized (there's not tag in HTML, after all).

The real problem was that, when editing, you would be presented with all you <s turned to <s, which you might not remember to edit (again and again) before submitting your modifications. Result? Your post gets botched by your edit. The fix was simple: preserve those <s as <s, but how do you tell the difference? Since there's no adverse effect to converting all <s to <s, and so forth, that's what was done.
Extrarius
Extrarius
Oluseyi: I'm not sure I understand your explanation. You seem to be saying that the ampersand codes are needed to prevent it from being treated as HTML, but the forums already convert anything that isn't allowed HTML to the proper ampersand codes when you submit your post. The problem is that they don't undo the conversion when presenting the post for editing, and instead the code keeps them 'ampersanded'. What I don't understand is why some character entities are 'ampersanded' yet again when editing (< for ex becomes < when editing) but others are not (™ does not become ™ when editing) when the desired behavior would be nearly opposite.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.