View Issue Details

IDProjectCategoryView StatusLast Update
0000931OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2012-12-07 14:29
Reporterjoshua Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version4.0.1.0 revision 15990 
Summary0000931: HTML-Tags in product title are not displayed correctly
DescriptionIf you have some HTML tags in your product title, e.g. using markup like <sup>©</sup> the title will be encoded and the result in shop frontend looks like this:
<sup>©</sup>

As a workaround, using the "rawValue" field of an object instead of the "value" field will solve that problem, so the output of the product title on details page should look like this: $product->oxarticles__oxtitle->rawValue

But in some cases, there is more to do than just changing the template var. For example, if you use product variants and one of the variants on details page is clicked, you see the back-link to parent product. In this case, there are two template vars provided by the backend: "parent_url" and "parentname". Printing out the var "parentname", the same effect as described above applies. Ther only way to change this is to write a short module, which returns the raw value of the product title instead of the normal one.


It would be nice, if this will be fixed in one of the futures releases...
TagsProducts
Theme
BrowserAll
PHP Version5.2.6
Database Version5.0.33

Activities

birute_meilutyte

2009-05-28 10:40

reporter   ~0000974

Reminder sent to: joshua

can not reproduce such behaviour neither on 4.0.1.0 revision 15990 nor on newest version. if I add "<sup>©</sup>" to product title, i see "<sup>©</sup>" in frontend also. (similar problem existed with selection lists titles, but it is already fixed in newer versions). could you provide some more information about special settings/modules, that are in the shop?

greetings,
Birute M.

joshua

2009-06-03 11:26

reporter   ~0001002

What do you mean by saying "i see "<sup>©</sup>" in frontend also"? Do you see it in the source code (then it should render correctly) or is it displayed in the rendered page (then it is encoded as "<sup>©</sup>" in the sourcecode)?

philipp_grashoff

2009-06-03 11:47

reporter   ~0001003

Last edited: 2009-06-03 13:25

Reminder sent to: joshua

I guess there is a misunderstanding:

joshua, you want to be able to enter HTML code and special chars in product titles which are then rendered.
By now, these input fields are working different: In frontend the value is displayed exactly as entered (if you enter <sup>..., then <sup>... is shown in frontend).

So this is more a feature request: That HTML code entered in titles is not displayed but is rendered, e.g. that "Product title ©" is shown as "Product title ©" in frontend, right?

joshua

2009-06-04 11:50

reporter   ~0001007

OK, I understand, two things about it:

1) In earlier shop versions (<4) this worked fine - the html tags were rendered correctly. Now, after upgrading the shop from 2.7.0.3 to EE 4, it works different, meaning that all html snippets in product titles are displayed plain and are not rendered in frontend (because the html tags are html encoded in source code)

2) The object $product->oxarticles__oxtitle now has one new property "->rawValue" besides the old one "->value". It seems that this new property "->rawValue" represents the original value from database, the old property now returns the values html encoded. Therefore as a quick fix we replaced all outputs in templates from "->value" to "->rawValue" - but in some cases (as I mentioned earlier), it is not possible to output the "->rawValue" property because there is no such object assigned to templates engine.


So, in general, why do you html encode the product titles in the object property "->value"?

If you plan to continue with this concept, you should additionally provide methods for retrieving the plain database (raw) value. For example using an extra parameter for a method like: $oView->getProductTitle($raw=true)

Waht do you mean?

birute_meilutyte

2009-08-06 10:01

reporter   ~0001367

@Developers: please, check from source code, if this implementation will not harm any functionality (titles are still displayed correctly everywhere, sorting and search by title works correct etc. ). if such changes will not harm shop - implement it. if it will harm, then need to discuss about possible solutions.

dainius.bigelis

2009-08-19 12:17

reporter   ~0001441

Reminder sent to: joshua

After some discussion with development team, ti's clear that solution for this issue needs lot of changes in the templates also implementing new methods for proper support of current and raw values.
So this case is moved to customers whishlist for further discussion in details and implementation in Major version.
Thus - the entry here is closed.

Thank you for your report.