forked from science-ation/science-ation
Trim the summary before we count the words on it
This commit is contained in:
parent
2fd5ab6a47
commit
d6ac7e36f5
@ -325,7 +325,7 @@ function countwords()
|
||||
|
||||
echo "<tr><td>".i18n("Summary").": </td><td><textarea onchange='countwords()' onkeypress='countwords()' cols=\"60\" rows=\"12\" id=\"summary\" name=\"summary\">".htmlspecialchars($projectinfo->summary)."</textarea>".REQUIREDFIELD."<br />";
|
||||
|
||||
$summarywords=preg_split("/[\s,]+/",$projectinfo->summary);
|
||||
$summarywords=preg_split("/[\s,]+/",trim($projectinfo->summary));
|
||||
$summarywordcount=count($summarywords);
|
||||
if($summarywordcount>$config['participant_project_summary_wordmax'])
|
||||
echo "<div id=\"wordcountmessage\" class=\"incomplete\">";
|
||||
|
Loading…
Reference in New Issue
Block a user