Exclude certain custom tags

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
PJBeee
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 6
Joined: Tue Oct 13, 2015 11:47 am

Exclude certain custom tags

Post by PJBeee » Tue Oct 13, 2015 12:06 pm

Code Samples here:

Code: Select all


<p style="line-height:125%;text-align:left;font-family:Verdana,Arial,Helvetica,sans-serif;color:#000000;font-size:9px;margin:1.0em 0 0 0">If you're having trouble viewing this email, you may <a href="[% webview_url %]" style="text-decoration:underline;color:#004BB3">see it online</a></p>
        
<p style="line-height:125%;text-align:left;font-family:Verdana,Arial,Helvetica,sans-serif;color:#444444;font-size:10px;margin:2.6em 0 0 0"><a href='[% share:email url_only="true" %]' style="text-decoration:underline;color:#0000EE"><b>forward</b></a> this to a friend</p>

I want to exclude from scanning/fixing the code shown in square brackets [ ..code.. ], including the single or double quotes and the brackets.

I see the menu option to "disable using exact text match", and the program highlights the code in question, but I can't see how to do the final step of actually disabling scanning/fixing. Am I at least on the right track?
Last edited by PJBeee on Tue Oct 13, 2015 6:39 pm, edited 1 time in total.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Exclude crertain custom tags

Post by Albert Wiersch » Tue Oct 13, 2015 12:43 pm

Hello,

You are on the right track if you are looking for ways to disable validator messages.

The easiest thing to do would be to disable the messages, but that would likely disable the messages for all issues including legitimate ones. If this is OK with you, then please use that method, otherwise I would be happy to see if a better solution is available using custom user functions (pro+ edition) to disable the message only when the href attribute starts with "[% ". Let me know if you'd like to do this.

As for disabling the message, you may be able to do it via the message ID or 'exact text match'. Below is more information about disabling messages:
https://www.htmlvalidator.com/v150/docs ... ssages.htm
https://www.htmlvalidator.com/v150/docs ... ssages.htm

After you disable the message, re-validate the document and the message should no longer show up.
Image
Albert Wiersch

Post Reply