release-system icon indicating copy to clipboard operation
release-system copied to clipboard

Create the links through the site router

Open laoneo opened this issue 2 years ago • 1 comments

ARS latest should create the links through the site router. If it doesn't and an article is created through webservices it crashes, that the build function is not found in the APIApplication class.

laoneo avatar May 02 '23 15:05 laoneo

While the observation about the behaviour is valid, the solution is not.

The correct solution would be replacing Route::_(...) with Route::link('site', ...).

The reason is that going through Route::link uses htmlspecialchars unless $xhtml is false. This means that the first four replacements you made (which had an implied $xhtml = true due to the default _() static method arguments) are now broken, only the fifth replacement being correct (it explicitly sets that parameter to false).

nikosdion avatar May 02 '23 20:05 nikosdion