Author Topic: HTML versus XHTML (well-formed) within table products_description  (Read 931 times)

michaelwechner

  • Sr. Member
  • ****
  • Posts: 110
    • View Profile
Hi

I have noticed that the table product_descriptions of the demo db of konakart contains not-well-formed HTML.

Is it possible somehow to enforce the editing tools of KonaKart that XHTML (well-formed) is saved?

Also I wanted to ask how this is handled by the SOAP interface? Is the not-well-formed HTML just moved into a CDATA block (e.g. description of products_id = '17')?

Thanks

Michael

julie

  • Administrator
  • Hero Member
  • *****
  • Posts: 386
    • View Profile
    • KonaKart
Re: HTML versus XHTML (well-formed) within table products_description
« Reply #1 on: May 25, 2010, 05:08:59 AM »
Regarding the enforcement of XHTML, if that's what you want you can use a custom engine and make a check on the insert and update product API calls before the call is actually passed on to th engine. http://www.konakart.com/docs/EngineCustomization.html

kate

  • Administrator
  • Sr. Member
  • *****
  • Posts: 221
    • View Profile
    • KonaKart Website
Re: HTML versus XHTML (well-formed) within table products_description
« Reply #2 on: May 25, 2010, 05:11:17 AM »
Quote
Is it possible somehow to enforce the editing tools of KonaKart that XHTML (well-formed) is saved?

You can't add this kind of validation to the Admin App directly but since every function of the Admin App uses the Admin API you can use standard KonaKart customization techniques to add the required validation on the editProduct API call.  Eg..  you could create your own editProduct (in a custom engine) and validate your product description before calling KonaKart's editProduct.

Quote
Also I wanted to ask how this is handled by the SOAP interface? Is the not-well-formed HTML just moved into a CDATA block (e.g. description of products_id = '17')?

You can look at the messages that AXIS 1.4 creates...  You'll see that it doesn't use CDATA sections but uses < > etc...

michaelwechner

  • Sr. Member
  • ****
  • Posts: 110
    • View Profile
Re: HTML versus XHTML (well-formed) within table products_description
« Reply #3 on: May 25, 2010, 07:22:27 AM »
Thanks very much for all your replies. I will have a closer look at the various possibilities and keep you posted on my findings.

Thanks

Michael