Keyword

K2 User's name with apostrophe causing issues

  • Best Practice Productions
  • Best Practice Productions's Avatar Topic Author
  • Offline
  • New Member
More
9 years 11 months ago #133041 by Best Practice Productions
K2 User's name with apostrophe causing issues was created by Best Practice Productions
Hi K2,
I would like to let you know about a small problem I am facing with logged in user's that have an apostrophe in their name.

I use JW player (via JoomlaRulez plugin) for media on the my site, and when a user with an apostrophe in their name tries to view a video the XML skin doesn't load.

I have tracked the cause and would like to inform you about it....

For example, I set up a user with the name: Beta'Tester

com_k2/controllers/item.php line 62

$K2('#userName').val('".$view->escape($user->name)."').attr ('disabled', 'disabled');


The apostrophe is not being escaped, the result is;

$K2('#userName').val('Beta'Tester').attr('disabled', 'disabled');


The effect this is having on my page load means the JW Player XML skin doesn't load.

I'm not sure why as I am not a php guy, but I thought I would let you know.

The workaround for me was to simply disable K2 comments as we don't use them.

Thanks
BPP

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

More
9 years 11 months ago #133042 by Lefteris
Hi. The issue has been fixed with this commit github.com/joomlaworks/k2/commit/fda158f88c4adcfab2fb1313ee70b89864b0d70b . Thank you for your feedback.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum