philipp.moser,
July 17, 2003 at 3:01:34 PM CEST
New function Hallo everybody. I've writen a function (for personal use of course) to replace invalid chars with nothing and "spaces" with "underscores". I've added this to the global object.functions.js. I had Problems with different Browsers (on Linux :) when downloading files or images. Its simply a copy of the regexp found in buildAliasFromFile plus the replacement of "spaces" with "underscores". Look at the code: /**
function replaceinvalidchars(name) { // replace spaces with _ var spaces = new RegExp(" "); spaces.ignoreCase = true; spaces.global = true; name = name.replace(spaces,"_"); // clean name from any invalid characters var invalidChars = new RegExp("[ \/?&=\+#äöüß\\]"); invalidChars.ignoreCase = true; invalidChars.global = true; return name.replace(invalidChars,""); } Second I added param.alias = replaceinvalidchars(param.alias) ; to the image and file object.functions.js. In the global object.functions.js i replaced the regexp with line 459: // clean name from any invalid characters return replaceinvalidchars(name); It's very simple maybe somebody adds it to the antville code if needed. Maybe nobody needs it. Philipp
tobi,
July 18, 2003 at 9:29:54 AM CEST
thanks interesting to know that there are still troubles with some characters with some browsers with some systems. ... comment
|
The Antville Server Fund has been a great success. Thanks to everybody who contributed!
online for 8545 Days
last updated: 1/4/11, 10:22 AM Youre not logged in ... Login
... home
... topics ... galleries ... Home
... Tags
... Galleries
... about antville ... download ... macros.antville.org ... help.antville.org ... translate antville! ... antville home
i understand your concerns however,
i hardly can think of a solution. certainly, if the...
by tobi (7/29/03, 9:47 AM)
Found several more similar sites
listed This is getting to be quite a concern to...
by cobalt123 (7/27/03, 7:56 PM)
Second Post Alert on Referrer
bug livecatz I put this into "help" and now here:...
by cobalt123 (7/26/03, 7:14 PM)
well it's not easy to
find from here, anyway. think we should include a link,...
by tobi (7/24/03, 11:25 AM)
clock not that it's particularly
earthshattering but the antclock is running slow by about 15...
by kohlehydrat (7/23/03, 8:25 PM)
How to log skin names
I accessed to console?? Hi, I would like to know...
by winson (7/23/03, 4:12 PM)
|