1
Vote

User names and perhaps other strings are not javascript-escaped

description

PageRatingHelper does not deal with names of users which may contain apostrophes. I got errors because my name is Mark O'Brien.
 
Suggest the line
 
string CurrentUserExpr = SPContext.Current.Web.CurrentUser.Name.Replace("\", "\\");
 
be replaced with
 
string CurrentUserExpr = SPContext.Current.Web.CurrentUser.Name.Replace("\", "\\").Replace("'", "\'");
 
or some other mechanism to deal with this.

comments