WordPress 3.9 duplicate HTML tag and Eclipse

Eclipse Version: Luna Release (4.4.0)
Wordpress Version: 3.9

WordPress file: wp-includes/function.php
Line 2975 – 2976

Read More
<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>

Eclipse validator returned two errorse those are two duplicate HTML tags opened without any PHP code or echo.

Should I ignore it or comment one line of these?

Related posts

Leave a Reply

1 comment

  1. This is related to this (closed as invalid) bug

    To sum up, they say eclipse validator doesn’t handle well html tags within php.

    From here you have two options.

    1. Cleaner, not so easy. Create a PHP working set to selectively disable validation:

      Refer to eclipse docs. Create a working set for the plugin/theme you are developing and then filter the contents in the problems view to that working set.

      It may also help you to focus on the source you are working on.

    2. Easier, not so clean. Disable/soften validation by type:

      Project -> Properties -> Validation -> HTML Syntax
       x Enable project specific settings
      Document Type -> Duplicate DOCTYPE declaration  (Change to Warning or Ignore)
      Element -> Unclosed Start tag (Change to Warning or Ignore)
      

      The last one is for two validation errors in wp-includes/media-template.php

    Also remember that there is a wordpress specific stackexchange web. I’ve answered here anyway because it may be useful for general html/php validation management in eclipse.