* fix bug #2766.
This commit is contained in:
@@ -1103,8 +1103,8 @@ class testcaseModel extends model
|
||||
if(empty($desc)) continue;
|
||||
$step = new stdclass();
|
||||
$step->type = $data->stepType[$key][$id];
|
||||
$step->desc = $desc;
|
||||
$step->expect = trim($this->post->expect[$key][$id]);
|
||||
$step->desc = htmlspecialchars($desc);
|
||||
$step->expect = htmlspecialchars(trim($this->post->expect[$key][$id]));
|
||||
|
||||
$steps[] = $step;
|
||||
}
|
||||
@@ -1152,7 +1152,7 @@ class testcaseModel extends model
|
||||
$stepData->parent = ($stepData->type == 'item') ? $parentStepID : 0;
|
||||
$stepData->case = $caseID;
|
||||
$stepData->version = $version;
|
||||
$stepData->desc = $step['desc'];
|
||||
$stepData->desc = htmlspecialchars($step['desc']);
|
||||
$stepData->expect = htmlspecialchars($step['expect']);
|
||||
$this->dao->insert(TABLE_CASESTEP)->data($stepData)->autoCheck()->exec();
|
||||
if($stepData->type == 'group') $parentStepID = $this->dao->lastInsertID();
|
||||
@@ -1189,7 +1189,7 @@ class testcaseModel extends model
|
||||
$stepData->parent = ($stepData->type == 'item') ? $parentStepID : 0;
|
||||
$stepData->case = $caseID;
|
||||
$stepData->version = 1;
|
||||
$stepData->desc = $desc;
|
||||
$stepData->desc = htmlspecialchars($desc);
|
||||
$stepData->expect = htmlspecialchars($this->post->expect[$key][$id]);
|
||||
$this->dao->insert(TABLE_CASESTEP)->data($stepData)->autoCheck()->exec();
|
||||
if($stepData->type == 'group') $parentStepID = $this->dao->lastInsertID();
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->testcase->stepID;?></th>
|
||||
<th class='w-p70 text-left'><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th class='w-p60 text-left'><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th class='text-left'><?php echo $lang->testcase->stepExpect;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -85,7 +85,7 @@
|
||||
echo "<th class='step-id'>$stepId</th>";
|
||||
echo "<td class='text-left'><div class='input-group'>";
|
||||
if($step->type == 'item') echo "<span class='step-item-id'>{$stepId}.{$childId}</span>";
|
||||
echo nl2br(str_replace(' ', ' ', htmlspecialchars($step->desc))) . "</td>";
|
||||
echo nl2br(str_replace(' ', ' ', $step->desc)) . "</td>";
|
||||
echo "<td class='text-left'>" . nl2br(str_replace(' ', ' ', $step->expect)) . "</div></td>";
|
||||
echo "</tr>";
|
||||
$childId ++;
|
||||
|
||||
Reference in New Issue
Block a user