Making WordPress.org

Ticket #403: readme-parser-validator.diff

File readme-parser-validator.diff, 1.1 KB (added by joostdevalk, 11 years ago)

Validator patch

  • readme-parser/validator.php

     
    178178        $url = wp_kses_no_null( stripslashes($_POST['readme_url']) );
    179179        $url = clean_url( $url );
    180180
    181         if ( strtolower(substr($url, -10, 10)) != 'readme.txt') {
     181        if ( strtolower(substr($url, -10, 10)) != 'readme.txt' && strtolower(substr($url, -9, 9)) != 'readme.md') {
    182182                readme_validator_head('Validator Error!');
    183                 die('URL must end in <code>readme.txt</code>!');
     183                die('URL must end in <code>readme.txt</code> or <code>readme.md</code>!');
    184184        }
    185185
    186186        if ( !$readme_contents = file_get_contents($url) ) {
     
    198198        $readme = $r->parse_readme_contents($readme_contents);
    199199        validate_readme($readme);
    200200} else {
    201         readme_validator_head('WordPress/BBPress Plugin readme.txt Validator');
     201        readme_validator_head('WordPress/BBPress Plugin readme.txt/readme.md Validator');
    202202?>
    203203<p>Enter the URL to your <code>readme.txt</code>:</p>
    204204<form method="post" action="">