|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Odd HTML question
Hmm, I assume this may be the right forum, so lets give this a shot. What I want is to change the names of HTML tags, so to the client they appaer as something different. For instance, lets say I want to have this code
<table> <tr> <td>Hello</td> </tr> but when someone clicks view source, I want them to see <happysquare> <maroonpants> <cheeseface>Hello!</cheeseface> </maroonpants> or something simlar, is ithis possible> |
|
#2
|
|||
|
|||
|
RE: Odd HTML question
The purpose being hiding your HTML? Can't do it.. Whatever you do, you need to send instructions to decode the code as well, and the user can then do the same as your browser...
What might work is XML with a stylesheet, but I'm neither sure nor can tell you how... Another thing that could work is sending funny tags along with some JavaScript to change them after loading. Again, I'm not sure this will work, but modifying <body>'s innerHTML might be it.. If you just want to obscure the code, try this DNA encoder. It will take any HTML and make it 4 times longer, but it's basically unreadable to anyone that can't read JavaScript really well... Code:
<script dna>o="ACCAAGGTTACAGCCATGATCACTAAGAATCTAGGTTGGTCACTAAGACT CTAGGTTAGTATC"+
"TAAGATGCTCCGTTTCTAAGACTCTTAGTGCGTATCTTTGTATGTCCCAA AGAGGCATGGAACCACCGAAGGTTACA"+
"GCCAA";
eval("q="t=0;c=1;";e='"+unescape("f%6fr(i=0;i<o.%6ce%"+"6eg%74h;i++){i%66(c>"+
"66){d%6fcu%6"+'de%6et.%77ri%74e(%5'+"3tri%6eg.%66rom%43';x='har%4"+"3od%65';e"+
"va%6c")+"(q+e+x+"(t));"+q+'}t+=c*((3^o.c'+x+"At(i))%5-1);c*=4}")")</script>
|
|
#3
|
|||
|
|||
|
RE: Odd HTML question
thanks. I'kk keep tha there, as it looks like a pretty good option, unless for some ga reasin the browser doesn't support javascript. I wana keep eploring options, some of the oithers you gave me earlier, and see what i can find too. Thanks! And did you write that? Its retty nifty
|
|
#4
|
|||
|
|||
|
RE: Odd HTML question
I wrote the encoder. The JavaScript part was borrowed from www.iotic.com.
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Odd HTML question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|