What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

I found my post title with special characters like & and ! being skipped and generated without them. I would like to know why is it done?

I found similar problem while forwarding user request with & and ! sign to another page via .htaccess.

like it:
user req pages/feedback & conact.htm and needs to be redirected to index.php?page=feedback & contact

Is it for the same reason do we have to skip those symbols or is there any other reason?

share|improve this question

migrated from stackoverflow.com Jul 18 '10 at 12:50

This question came from our site for professional and enthusiast programmers.

1  
Better raising this question at meta.stackoverflow.com –  dalton Jul 18 '10 at 12:43
    
Questions about stackoverflow.com belongs in meta.stackoverflow.com –  polygenelubricants Jul 18 '10 at 12:44
2  
With slightly different wording this question might not have been migrated and might have had some decent answers. For instance, if it referred to "some sites" exhibiting this behaviour and included SO as one of them, would it have been migrated? –  Andy E Jul 18 '10 at 14:55
2  
Yup, I agree this shouldn't have been migrated. It is not really a Meta question. –  Pëkka Jul 18 '10 at 16:04
    
@Pekka: I think it's unclear if the OP is asking about SO or about one of his/her projects. May as well leave it here for one of the devs to answer. –  Jon Seigel Jul 18 '10 at 17:20
    
If we're going to complain about a stripped character go with +. A question with the title "C++ problem" turns into stackoverflow.com/.../c-problem –  Michael Mrozek Jul 18 '10 at 17:23
add comment

3 Answers 3

up vote 4 down vote accepted

found my post title with special characters like & and ! being skipped and generated without them. I would like to know why is it done?

The & is a reserved character and illegal to use in an URL, as are e.g. ?, :, and ,. Most "URL generating" functions strip out any and all special characters to avoid problems.

The alternative would be to URL-encode these characters with %nn sequences.

share|improve this answer
1  
Exactly and that's why this question was about web programming and not SO itself. I think it should not have been moved. –  allesklar Jul 18 '10 at 20:23
    
It can be somewhat fine than others –  KoolKabin Jul 20 '10 at 17:10
1  
@allesklar, the answer is about web programming. The OP might have had no idea that the answer had to do with programming, but there's no doubt that the question is about SO. Migration seems justified in this case. –  Pops Jul 20 '10 at 18:13
add comment

This request is so completely nonsensical it feels like an enormous waste of my time.

why in the world would we want..

Why is Stack Overflow skipping & and ! sign in question titles?

to be...

/questions/57577/why-is-stack-overflow-skipping-ampersand-and-exclamation point-sign-in-question-titles

Or, even worse

I got a question!

to be...

/questions/12345/i-got-a-question-exclamation-point

share|improve this answer
add comment

Your question has & and ! in the title and they both are working fine.

share|improve this answer
3  
Check the URL generated from the question title "why-is-stack-overflow-skipping-and-sign-in-question-titles" (to quote just the title). –  ChrisF Jul 18 '10 at 13:58
    
The OP didn't say that they cared about that. –  Rosinante Jul 18 '10 at 14:48
    
yeah i am surely pointing about the url being generated –  KoolKabin Jul 20 '10 at 17:10
3  
Why do you care about that? –  Rosinante Jul 20 '10 at 17:56
    
want to know why can't we use it in url. is it due to htaccess problem –  KoolKabin Sep 22 '10 at 14:45
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .