By "SEO part of the URL" I mean:
The SEO part appears to be constructed where for each character in the question's title:
- If it's a letter or a number, copy it in the SEO part
- If it's not and the last character in the SEO part is not a dash, add a dash
This, however, has the big problem that questions with C++ in the title appear to a human reader to be about C.
Example: C++, an "impossible" behavior , whose title is "C++, an “impossible” behavior."
Consider plusses as valid characters. You don't even have to replace them with
%XX, C++, an "impossible" behavior is a perfectly valid URL.
I know that some of you don't like it when people put the language in the question title, but whether you like it or not it's something that is done in practice. So I feel that what I proposed is necessary, and I also ask you to please not discuss here about whether putting the language in the title is good practice or not. Thanks.
There has been some discussion about whether
+ is a valid character in an URL, and whether it has a valid meaning. In a path it is valid and it doesn't have a special meaning.
From the RFC:
reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ","
3.3. Path Component:
pchar = unreserved | escaped | ":" | "@" | "&" | "=" | "+" | "$" | ","
The path may consist of a sequence of path segments separated by a
single slash "/" character. Within a path segment, the characters "/", ";", "=", and "?" are reserved.
pchar (the valid characters in a path) is formed by unreserved characters in addition to the reserved characters explicitly allowed.