分享

MSN Space 简易教程(三十九)—— 突破 Custom HTML 字符限制的尝试 ...

 夏春清风 2010-07-30

MSN Space 简易教程(三十九)—— 突破 Custom HTML 字符限制的尝试

来源:互联网 作者:msnmagic.cn整理 时间:2008-08-08 Tag: 点击:

 


MSN Space Easy Tutorial (39) —— Attempts to exceed 512 Character Limit in Custom HTML Module
 
中文版
 
自从 Custom HTML 模块被引用到 MSN Space 中之后,就有朋友询问能否突破 512 个字符的限制。而且我也碰到过类似的问题,首页上的两个置顶图片曾经就是因为链接过长,导致不得不把其中一张图片放到 MSN Space 以外的网站上。其实那代码也没长多少,530 多个字符,可就是无法保存在 Custom HTML 模块中。
 
不久前 Sanall Cobain 对突破 Custom HTML 模块字符限制做了一定的研究,不过 Sanall 后来写到“就算通过其他方法绕过了本地的js合法性检测,也没有办法突破512个字节的限制”。那么是否能突破 Custom HTML 的 512 个字符的限制呢?我特地做了一次尝试,输入了 644 个字符长的代码,然后使用 Sanall 写的代码,结果发现确实有一部分代码被截断了,但剩下了 575 个字符长的代码!而且通过反复尝试,我最多曾在 Custom HTML 中写入 615 个字符长的代码,比原来 512 个字符的限制多写了 103 个字符。
 
如果你想在 Custom HTML 中增加少量代码,那么就按照这个方法试试吧。
 
1、如果你还没有添加 Custom HTML 模块,请先看看简易教程(二十六)。对于已添加了 Custom HTML 模块的朋友,请先在 Custom HTML 模块中添加不超过 512 个字符的代码,“Save”一下。 
 
2、现在请在 Custom HTML 模块中添加更多的代码,但最好不要超过 660 个字符。你既可以直接按“Save”按钮,看看你代码的字符数是多少,也可以用 Word 或者其他字处理软件来统计一下代码的字符数。
 
English Version
 
After Custom HTML module was introduced into MSN Spaces, some friends came to ask me whether it could break the 512 charater limit. I also thought on this problem for a while, because once I tried to put some pictures in Custom HTML module, I was told that "You can enter only 512 characters; Current count : 534".
 
About one month ago, Sanall Cobain attempted to exceed the limit by using a Javascript code to bypass the checking of the code length. But after he input a long code in the Custom HTML module, the code was cut to 510 characters. Then he claimed that "the 512 character limitation is not only on the client side, but also on the server side". It seems no way to break the limit. However, when I tried his code, I got different results. At the beginning, 644 character code was input, then the Sanall's Javascript code was applied. Although the code was also cut short, 575 charaters were left in the Custom HTML module! After several attempts, I could have at most 615 charaters in my Custom HTML module, which is 103 longer than the length limitation.
 
You can use this method to get a little more characters in your Custom HTML module.
 
1. Input no more than 512 charater code in your Custome HTML module, then "Save" it.
 
2. Add more codes in the Custom HTML module, but no more than 660 charaters. You can click the "Save" button to know how long the codes are.

 
3、此时请将如下代码复制到在 IE 地址栏内:
 
3. Copy and paste the following Javascript code to the IE address bar:
javascript:var e1=document.getElementById("htmlText");var e2=document.getElementById("moduleName");XMLHttp("FormMethod=post&MethodType=savehtml&moduleName="+SimpleEncode(e2.value)+"&showBorder=false&rawData="+SimpleEncode(e1.innerHTML),"http://spaces./members/YourID/PersonalSpace.aspx?_c=CustomHTML&_c02_owner=1");void(location.reload());
 
请将代码中蓝色部分修改为你自己的 MSN 名称,再按 Enter(回车)键!为了便于使用,可以将这段代码做成一个链接,添加到收藏夹内。请参考简易教程(二十七)中的添加 Javascript 工具的办法。
 
4、这时就可以看看还剩多少代码,应该超过 512 个字符了吧!(注意尽管 MSN 显示提示还是“You can enter only 512 characters”,但实际留在 Custom HTML 模块中的字符数已经超过这一限制了!
 
如果一次不成功,可以反复尝试,一般在 Custom HTML 模块中添加近 600 个字符的代码是没什么问题的。当然,我发现剩余字符的多少似乎和所添加代码的内容有关,代码不同有时就留下多些,有时就少些。另外,我没时间对多个 Custom HTML 模块的情况进行研究,请大家自己慢慢尝试吧。如果你成功了,或者有更好的方法,欢迎回来告诉大家一声,我这块砖头就算没白抛。
 
最后,还要感谢 Sanall Cobain 编写的代码!
 
Please remember to change the blue part to your ID of MSN Spaces. Then, press Enter key or the Go button. If you want, you may add this Javascript code to your IE favorite for convenience.
 
4. After the webpage refreshes, you can check how many characters are left in your Custom HTML module by clicking the "Save" button. Although it still said "You can enter only 512 characters", there should be more than 512 characters in the Custom HTML module!
 
You may need to try several times to get the job done. In general, it should be no problem to have about 600 charaters in your Custom HTML module. Of course, I found sometime I had more codes left in the Custome HTML module, sometime not. The results may be affected by the HTML codes that are used. If you know a better way or you want to let others know the result of your trial, please leave a comment here.
 
Finally, thank Sanall Cobain to provide the Javascript code!


    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多