Ticket #403: readme-parser-validator.diff
File readme-parser-validator.diff, 1.1 KB (added by , 11 years ago) |
---|
-
readme-parser/validator.php
178 178 $url = wp_kses_no_null( stripslashes($_POST['readme_url']) ); 179 179 $url = clean_url( $url ); 180 180 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') { 182 182 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>!'); 184 184 } 185 185 186 186 if ( !$readme_contents = file_get_contents($url) ) { … … 198 198 $readme = $r->parse_readme_contents($readme_contents); 199 199 validate_readme($readme); 200 200 } else { 201 readme_validator_head('WordPress/BBPress Plugin readme.txt Validator');201 readme_validator_head('WordPress/BBPress Plugin readme.txt/readme.md Validator'); 202 202 ?> 203 203 <p>Enter the URL to your <code>readme.txt</code>:</p> 204 204 <form method="post" action="">