ensure short tags aren't part of search results
This commit is contained in:
parent
2eac8f71dc
commit
0723e03ce9
@ -80,7 +80,7 @@ class WDTSTranscriptManager {
|
||||
function _update_search_field($transcripts) {
|
||||
if (!empty($this->search_key)) {
|
||||
$search_lines = array();
|
||||
foreach ($transcripts as $transcript) { $search_lines[] = $transcript['transcript']; }
|
||||
foreach ($transcripts as $transcript) { $search_lines[] = preg_replace('#\[[^\]]+\]#', '', $transcript['transcript']); }
|
||||
update_post_meta($this->post_id, $this->search_key, implode(" ", $search_lines));
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ class WDTSTranscriptTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
$this->w->save_transcript(array(
|
||||
'language' => 'fr',
|
||||
'transcript' => "il s'agit d'une nouvelle transcription"
|
||||
'transcript' => "[dialog]il s'agit d'une nouvelle transcription[/dialog]"
|
||||
));
|
||||
|
||||
$this->assertEquals(
|
||||
@ -73,7 +73,7 @@ class WDTSTranscriptTest extends PHPUnit_Framework_TestCase {
|
||||
),
|
||||
array(
|
||||
'language' => 'fr',
|
||||
'transcript' => "il s'agit d'une nouvelle transcription",
|
||||
'transcript' => "[dialog]il s'agit d'une nouvelle transcription[/dialog]",
|
||||
'user_id' => 1,
|
||||
'key' => 1
|
||||
),
|
||||
@ -100,7 +100,7 @@ class WDTSTranscriptTest extends PHPUnit_Framework_TestCase {
|
||||
),
|
||||
array(
|
||||
'language' => 'fr',
|
||||
'transcript' => "il s'agit d'une nouvelle transcription",
|
||||
'transcript' => "[dialog]il s'agit d'une nouvelle transcription[/dialog]",
|
||||
'user_id' => 1,
|
||||
'key' => 1
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user