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

[Bug] Control characters in javascript source files #1146

Closed
dowlingw opened this issue Jul 7, 2016 · 4 comments
Closed

[Bug] Control characters in javascript source files #1146

dowlingw opened this issue Jul 7, 2016 · 4 comments
Labels
Milestone

Comments

@dowlingw
Copy link
Contributor

dowlingw commented Jul 7, 2016

It looks like some dodgy control characters have made it into the source files since 0.9.1.

Specific pages within the application will fail when rendering affected templates with an error similar to the following:

Error: [$parse:lexerr] Lexer Error: Unexpected next character at columns 10-10 [Â] in expression ['DETAIL' |Â translate].

Using hexdump it is possible to see the characters in the source files:

$ hexdump -s 0x000002f0 -n 16 -C src/javascripts/ng-admin/Crud/show/show.html
000002f0  20 7b 7b 20 27 44 45 54  41 49 4c 27 20 7c c2 a0  | {{ 'DETAIL' |..|
00000300

The character sequence 0xc2 0xa0 should be 0x20.
This occurs in several files in the project where templates have been updated for translation.

Easy fix, but logging here because the PR is going to be confusing without an explanation.

@dowlingw
Copy link
Contributor Author

dowlingw commented Jul 7, 2016

$ for i in `find .`; do xxd -p $i | tr -d \\n | grep -q c2a0; if [ $? -eq 0 ]; then echo $i; fi; done
./javascripts/ng-admin/Crud/column/maJsonColumn.js
./javascripts/ng-admin/Crud/delete/batchDelete.html
./javascripts/ng-admin/Crud/delete/delete.html
./javascripts/ng-admin/Crud/form/create.html
./javascripts/ng-admin/Crud/show/show.html
./javascripts/ng-admin/Main/view/404.html

Generating PR now :)

@Jeoffreybauvin
Copy link

Any chance to merge this please ?

@amitjain3
Copy link

amitjain3 commented Sep 14, 2016

Hi,
As per installation steps on page https://ng-admin-book.marmelab.com/
I have done
bower install ng-admin --save
and now trying html example it gives below error , is above error not fixed in latest module which bower downloads ? Could you please suggest how can I fix it in on windows machine.

angular.js:12783Error: [$parse:lexerr] Lexer Error: Unexpected next character at columns 13-13 [Â] in expression ['NOT_FOUND' | translate].

@afoninsky
Copy link

Confirm: bug is still exists, rolling back to previous ng-admin release in production

@fzaninotto fzaninotto added this to the 1.0 milestone Nov 18, 2016
@fzaninotto fzaninotto added the bug label Nov 18, 2016
fzaninotto added a commit that referenced this issue Dec 1, 2016
[RFR] Remove instances of {0xC2, 0xA0} in source files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants