View Issue Details

IDProjectCategoryView StatusLast Update
0003346OXID eShop (all versions)4.09. SEO, SEO URLpublic2012-12-10 13:34
Reportercsimon Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Product Version4.5.4 revision 39463 
Fixed in Version4.5.6 revision 40808 
Summary0003346: SEO URLs defined in admin are saved with htmlentities
DescriptionAs described. This is not really clean because the htmlentities aren't really a part of a proper URL and if you want to fetch some seo url with "&" in it, you wonder why you don't get the URL.
Steps To ReproduceDefine a SEO URL for a view in admin with &-signs in it.

oxseo.oxstd url will contain the url with & instead of &
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

csimon

2011-11-02 13:11

reporter   ~0005354

I mean 'amp; sign instead of a & sign. The bugtracker has eaten that.

arvydas_vapsva

2011-12-19 09:16

reporter   ~0005508

all dynamic URLs in database are stored this way - & character is translated into html entity, so if you need plain URL - use use html_entity_decode() function. In future we plan to implement special object, who keeps/transforms URLs according your needs, so you will be able to fetch save (encoded) URLs and decoded.. So it's not a bug..

csimon

2011-12-19 10:53

reporter   ~0005509

According to http://tools.ietf.org/html/rfc3986 & is an control character and therefore the seo urls with 'amp; signs are wrong. I cannot test it now, but if you would call the encoded url from the database for example with curl, the url would be wrong and the request would fail.

The HTML Encoding has nothing to do with the url standard and is only for display purposes, so it should at least be corrected in a later version that the urls aren't saved in the wrong format anymore.

arvydas_vapsva

2012-01-28 12:27

reporter   ~0005664

Normally URL's are used in templates (html) and & character should be transformed into entity (or HTML validator will tell that we have badly formatted HTML).

When URL's are used for redirection to another page - we usually process them and replace entities with resp. characters.

Also - as now we do not have any specific object/class responsible for URL formatting (something like oxField and its getValue()/getRawValu()) so we must ensure that data is safe for use in HTML and we came to idea, that we will keep data in DB converted into entities.

As soon as we implement class (probably already in next major release) responsible for formatting, you will have both - plain and encoded values.

arvydas_vapsva

2012-01-28 12:30

reporter   ~0005665

Also - we cant just change code now and make everywhere straight & instead of entity. That would lead to many incompatibilities with third party modules and shop itself. So - id call this change MAJOR and would really like to keep current solution until next major release.