This is a migrated thread and some comments may be shown as answers.

Javascript Error Uncaught SyntaxError: Unexpected Identifier

4 Answers 524 Views
SocialShare
This is a migrated thread and some comments may be shown as answers.
Cognitronic
Top achievements
Rank 2
Cognitronic asked on 21 Nov 2011, 04:36 PM
I'm using the RadSocialShare control on a product details page in an eCommerce app and it was working fine for most products, but a few would not display the buttons.  In Chrome's javascript console I saw it was throwing the uncaught syntaxerror due to an apostrophe in the TitleToShare property's value.  As soon as I removed the apostrophe it started working....hope this helps someone else!

4 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 22 Nov 2011, 04:59 PM
Hi guys,

We are aware of this issue and it has recently been addressed. The fix will be available in the next internal build (due in the beginning of the next week) and in all later official releases.


Best wishes,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Justin Furniss
Top achievements
Rank 1
answered on 23 Nov 2011, 06:03 AM
I'd like to know when the new build is available also.  Any work-around for the time being?
0
Justin Furniss
Top achievements
Rank 1
answered on 23 Nov 2011, 06:06 AM
Nevermind.  Double escaping seems to work for me.

"Checkout someone\\\\'s new blog post!";
0
bojanv
Top achievements
Rank 2
answered on 29 Nov 2011, 05:56 PM
Cognitronic, thank you for the tip....didn't see that coming...everything works on local dev machine and in staging, since nobody entered ' or ".

Your solution workedt. It also helps, if you remove any breaks, if user enters text in multiline textbox.

I would also add myself to the list for the fix. 
Tags
SocialShare
Asked by
Cognitronic
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Justin Furniss
Top achievements
Rank 1
bojanv
Top achievements
Rank 2
Share this question
or