This is a migrated thread and some comments may be shown as answers.

"HTML: missing ';'

9 Answers 106 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jc mag
Top achievements
Rank 1
jc mag asked on 17 Mar 2011, 02:23 PM
I'm trying justCode and I have the "HTML: missing ';'" warning for the ampersand on this line:

<a href='History.aspx?page=<%# Eval("PageName") %>&revision=<%# Eval("Number") %>'>

but there is no need to display a warning in this case.

9 Answers, 1 is accepted

Sort by
0
Hans Kratz
Telerik team
answered on 17 Mar 2011, 02:34 PM
Hello,

Thanks for the feedback!

Actually the warning is valid. In order to have proper HTML produced you need to write &amp; instead of just the &.

See e.g. this article for details:
http://htmlhelp.com/tools/validator/problems.html#amp

Best wishes,
Hans Kratz
the Telerik team
0
WaldenL
Top achievements
Rank 2
answered on 10 Jul 2012, 03:08 PM
Old post, I know, but... Yes, _technically_ you are correct, the HREF, SRC, or similar attribute is an HTML attribute, and as such should be HTML encoded. However, that's not commonly done, and while I'd love to "Fix" it, there are many other fish to fry. The problem is, I don't see a way to turn off that type of warning for HTML and ASP.Net code. I've LOVE to see a setting called "Ignore in HREF, SRC and similar attributes, unless text is a recognized entity value", but I'll take an general ignore for now. Any suggestions?
0
Zdravko
Telerik team
answered on 13 Jul 2012, 02:22 PM
Hello,

 Thanks for contacting us.
Maybe it would be better if there is an option that allows to disable this kind of warning.
We are thinking to implement it in some of the future versions of JustCode.
Thanks and have a nice day.

Kind regards,
Zdravko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Caleb
Top achievements
Rank 1
answered on 08 Aug 2012, 03:39 AM
I'm getting this error too and it's invalid:

<a href='FormInputEdit.aspx?cid=0&pid=<%# EditId %>'>Add New Field</a>


it fails in many places on my site because of this too.. there's no option to disable this invalid error either
0
Zdravko
Telerik team
answered on 09 Aug 2012, 03:28 PM
Hello,

 @Caleb 
Yes, it is the same. You have to escape the & with &amp; in order fix the warning. The other way to fix it is to ignore the warning.
Thanks.

Greetings,
Zdravko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
JeffSM
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 20 Aug 2014, 08:18 PM
How do ignore? Is there a way to do for all alerts?
0
Nikolay Valchev
Telerik team
answered on 25 Aug 2014, 11:49 AM
Hello Jefferson,

Here you can see how to ignore a warning or an error. Could you tell us what exactly you want to achieve: ignore all warnings/errors of any kind or in a particular kind?

Regards,
Nikolay Valchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
JeffSM
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 25 Aug 2014, 03:19 PM
The particular kind, subject of this post: HTML: missing ';', for all solutions.
0
Nikolay Valchev
Telerik team
answered on 28 Aug 2014, 11:29 AM
Hello Jefferson,

You can watch this video and see how to ignore them all. Note that this will ignore all warnings of this kind which are already existing, those that are introduced after this action is performed will not be ignored and you should repeat the same procedure again. Another thing which you can do is to change the problem type to 'disabled' but since this warning is assigned to 'Language Warnings' group all other warnings that belong to this group will be ignored, too.

If you have any further questions or remarks, please do not hesitate to contact us!

Regards,
Nikolay Valchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Code Analysis
Asked by
jc mag
Top achievements
Rank 1
Answers by
Hans Kratz
Telerik team
WaldenL
Top achievements
Rank 2
Zdravko
Telerik team
Caleb
Top achievements
Rank 1
JeffSM
Top achievements
Rank 2
Iron
Veteran
Iron
Nikolay Valchev
Telerik team
Share this question
or