Fix issue#1

This commit is contained in:
Jonny Barnes 2016-05-25 22:43:28 +01:00
parent 4797da562b
commit 0504555774
2 changed files with 13 additions and 2 deletions

View file

@ -155,6 +155,15 @@ class NotesController extends Controller
*/
public function taggedNotes($tag)
{
$tag = mb_strtolower(
preg_replace(
'/&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml|caron);/i',
'$1',
htmlentities($tag)
),
'UTF-8'
);
$tagId = Tag::where('tag', $tag)->pluck('id');
$notes = Tag::find($tagId)->notes()->orderBy('updated_at', 'desc')->get();
foreach ($notes as $note) {