RAW HTML now showing in WorldPay Checkout

  • Posts: 170
  • Thank you received: 8
  • Hikashop Essential
2 years 10 months ago #338492

-- HikaShop version -- : 4.4.5
-- Joomla version -- : 3.10.4
-- PHP version -- : 7.4.27
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : raw HTML showing in WorldPay

Hi All,
Just upgraded to 4.4.5 from 4.4.4 and going through the test scenario discovered the description is displaying some raw HTML in the WorldPay Description box?

Thanks
Ian

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 10 months ago #338493

Hi,

That's a bug in the WorldPay plugin that has always been there. Thanks for reporting it.
It only happens when you have products with characteristics/variants in the order and it is not linked to the update.
You can fix that by changing the line:

$vars["C_item_name_".$i]=substr($product->order_product_name,0,127);
to:
$vars["C_item_name_".$i]=substr(strip_tags($product->order_product_name),0,127);
in the file plugins/hikashoppayment/bf_rbsbusinessgateway/bf_rbsbusinessgateway.php
We'll add that on our end too.

The following user(s) said Thank You: ianspeed

Please Log in or Create an account to join the conversation.

  • Posts: 170
  • Thank you received: 8
  • Hikashop Essential
2 years 10 months ago #338503

Hi Nicolas,
Made the mod, but no change?
I've set the plugin to show only the company and price at the moment.

Thanks
Ian

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 10 months ago #338506

Hi,

I don't see why it wouldn't work.
Could you provide the URL of that product with the issue and a FTP access via our contact form so that we can check the situation ?
www.hikashop.com/support/contact-us.html

Last edit: 2 years 10 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 10 months ago #338528

Hi,

Thanks. I found the problem.
There is another line to change.
You need to change:

$vars['desc'] = substr($product->order_product_name, 0, 255);
to:
$vars['desc'] = substr(strip_tags($product->order_product_name), 0, 255);
in that same file and it will work.

The following user(s) said Thank You: ianspeed

Please Log in or Create an account to join the conversation.

  • Posts: 170
  • Thank you received: 8
  • Hikashop Essential
2 years 10 months ago #338548

All working now, thanks.

The following user(s) said Thank You: Philip

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 10 months ago #338559

Hi,

Thanks for the feedback. We'll add these changes on our end too.

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum