Skip to content

Commit a15c854

Browse files
authored
Remove html <a/> tag from route on clockwork (#1777)
1 parent b3b9a51 commit a15c854

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/Support/Clockwork/Converter.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ public function convert($data)
7070
$controller = $route['uses'];
7171
}
7272

73-
$output['controller'] = $controller;
73+
$output['controller'] = preg_replace('/<a\b[^>]*>(.*?)<\/a>/i', '', (string) $controller) ?: null;
7474

7575
list($method, $uri) = explode(' ', $route['uri'], 2);
7676

7777
$output['routes'][] = [
78-
'action' => $controller,
78+
'action' => $output['controller'],
7979
'after' => isset($route['after']) ? $route['after'] : null,
8080
'before' => isset($route['before']) ? $route['before'] : null,
8181
'method' => $method,

0 commit comments

Comments
 (0)