saka said: Just to be clear, these entities are fine if tags are added from the advanced edit window for each series, just not from the lists. It's only the javascript on the list pages at fault here. Yes, the tag text is generated correctly (exactly as user inputed) if user submits it from the advanced edit window. But the problem is, that the tag is not encoded to generate the tag href, even from advanced edit window. So if the user submits, for example a tag named "boobs&guns", from advanced edit window, the tag text will be as user desired, but the tag href will be http://myanimelist.net/animelist/username&tag=boobs&guns which is not correct, because "&" is treated as the beginning of the next parameter and cannot be used in the parameter value. It should be encoded into "%26" first.
And the same problem goes for escape codes: if user submits "%26" from the advanced edit window, the tag text will be "%26" (as desired), but the tag href will be http://myanimelist.net/animelist/username&tag=%26 which is not correct, because the value will be treated as if the tag is "&" and not "%26". It should be "%2526" instead.
So as i said - submitted tags must each be encoded first to generate tag hrefs.
saka said: The tag text should not be url-escaped on submit, because it's the browser's responsibility to do this internally when formatting the POST data. I understand this.
But you don't get the point here. The tag should ultimately result in exactly what user entered.
In a case when forms do not use «enctype="multipart/form-data"», if it is an escape code, then it will be encoded once more by the browser on submit, and the server will get the code for user inputed escape code. This is not too hard to understand.
What is wrong - is that these received POST data are decoded back to generate the tag href. But they should only be decoded back to generate the tag text.
In contrast, in a case when forms do use «enctype="multipart/form-data"», then the browser does not encode the POST data. In this case, the tag text can be generated without any additional processing, and url-encoding must be used to generate the tag href.
I may be wrong on the last paragraph, but this still doesn't change the problem. |
Ash88Jul 10, 2011 4:42 PM