Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS is broken when a course name contains single quotes as apostrophes #6

Open
pavelsokolov opened this issue Mar 21, 2017 · 3 comments

Comments

@pavelsokolov
Copy link

pavelsokolov commented Mar 21, 2017

This is the line that fires the bug: 27603b4#diff-f60cd2aea150933cf31741bcc045d84fR54

Cleanurl needs to be enabled.

Example:
this course name works fine: Master´s Programme in Open eGovernment
this course name break all JS on the page: Master's Programme in Open eGovernment

_paq.push(['setDocumentTitle', 'Program Forums/Master's Programme in Open eGovernment/Edit']);

@bmbrands
Copy link
Owner

Thanks for reporting this! I have fixed the issue and updated the plugin!

bmbrands added a commit that referenced this issue Mar 21, 2017
@davidlanier
Copy link

We have noticed that other control characters such as a carriage return also breaks the JS.

Recommend adding preg_replace('~[[:cntrl:]]~', '', $input); also.

@peterspicer-catalyst
Copy link

Or, better, build an array of the output and pass it to json_encode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants