It is clear why I would not want to do this. But I have little choice in the matter.
Will browsers be able to handle this?
Chrome seems to be okay with it:
> var x = {};
> x['a\nb'] = 1;
1
> x
Object
a b: 1
__proto__: Object
> Object.keys(x)
["a
b"]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes. Browsers should be able to handle that. You’ll just have to use bracket notation to access that property.