Skip to content

Commit

Permalink
Merge branch 'bugfixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
jkim01 committed Feb 21, 2019
2 parents 18efe14 + db626cb commit 48d3cfe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/AlgoliaService.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ function mapAlgoliaFieldsToIndex($article){
foreach($fieldsToIndex as $field){
switch($field){
case "title":
$mappedFields[$field] = $article->getTitle(null);
$mappedFields[$field] = $this->formatTitle($article);
break;

case "abstract":
Expand Down Expand Up @@ -525,4 +525,10 @@ function chunkContent($content){

return $data;
}

function formatTitle($article){
$title = $article->getTitle(null);

return preg_replace("/<.*?>/", "", $title);
}
}

0 comments on commit 48d3cfe

Please sign in to comment.