Commit 93c7c13b authored by Martin Gregor's avatar Martin Gregor
Browse files

pridanie strip tags pri ukladani vety a korekcie

parent 51e3f1bf
......@@ -154,7 +154,7 @@ class HomepagePresenter extends BasePresenter
else
{
$this->db->table('corrections')->insert(['use_count' => 1, 'translation_id' => $trans_id,
'correction' => $correction,'correction_count' => count($words)]);
'correction' => strip_tags($correction),'correction_count' => count($words)]);
$correction_id = $this->db->lastInsertId();
foreach ($words as $position => $word)
......@@ -260,7 +260,7 @@ class HomepagePresenter extends BasePresenter
}
else
{
$this->db->table('translations')->insert(['sentence_id' => $this->sentence_id,'translation' => $sentence, 'lemas' => implode(' ',$this->words_lema),
$this->db->table('translations')->insert(['sentence_id' => $this->sentence_id,'translation' => strip_tags($sentence), 'lemas' => implode(' ',$this->words_lema),
'correct_count' => 0, 'incorrect_count' => 0, 'view_count' => 1,
'translated_word_count' => count($this->sentences[$sentence])]);
$translation_id = $this->db->lastInsertId();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment