Error Parsing" unusual brackets.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nadya.fd
Forum Newbie
Posts: 4
Joined: Mon Sep 08, 2014 11:57 am

Error Parsing" unusual brackets.

Post by nadya.fd »

Hello,
I always had "Error parsing" message in "--" brackets, example:

Code: Select all

<!-- <button 
...
onclick="cancelOrder({productId:'-- Error parsing: Core.data.productId --', imgPath:'-- Error parsing: Core.data.imgPath --', action:'cancelOrder'});">
Cancel </button> -->
Now I have it in different brackets "<--" on some pages, which cause problems parsing HTML, example:

Code: Select all

<!-- <button 
...
onclick="cancelOrder({productId:'<!-- Error parsing: Core.data.productId-->', imgPath:'<!-- Error parsing: Core.data.imgPath-->', action:'cancelOrder'});">Cancel-->

 -->
Any ideas why???

Thank you!
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Error Parsing" unusual brackets.

Post by Weirdan »

Because you can't have less-than (<) or greater-than (>) sign in attribute values. You need to use their html entity equivalents instead, < and > respectively.
nadya.fd
Forum Newbie
Posts: 4
Joined: Mon Sep 08, 2014 11:57 am

Re: Error Parsing" unusual brackets.

Post by nadya.fd »

Where do I have (<) or (>) as attribute value ?

There is no value by now, because Core.data array is empty.
donny
Forum Contributor
Posts: 179
Joined: Mon Aug 11, 2014 11:18 am

Re: Error Parsing" unusual brackets.

Post by donny »

Code: Select all

<button onclick="cancelOrder({productId:'<!-- Error parsing: Core.data.productId --!>', imgPath:'<!-- Error parsing: Core.data.imgPath --!>', action:'cancelOrder'});">
Cancel</button>
the brackets you had in your error message comments out your code when parsed. you need to replace the brackets with their correct entities

--abreadupandmytopdown--
nadya.fd
Forum Newbie
Posts: 4
Joined: Mon Sep 08, 2014 11:57 am

Re: Error Parsing" unusual brackets.

Post by nadya.fd »

Absolutely, donny!!!

The question is "Where do they come from?"

It is a part of the "Error parsing" message. Why?
message suppose to be like " --Error parsing--" and now it is like"<!--Error parsing-->"
Post Reply