diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.php index ec50933583..4a068ba642 100644 --- a/app/Presenters/AssetPresenter.php +++ b/app/Presenters/AssetPresenter.php @@ -548,8 +548,10 @@ class AssetPresenter extends Presenter public function dynamicWarrantyUrl() { $warranty_lookup_url = $this->model->model->manufacturer->warranty_lookup_url; - $url = (str_replace('{LOCALE}',\App\Models\Setting::getSettings()->locale,$warranty_lookup_url)); - $url = (str_replace('{SERIAL}',$this->model->serial,$url)); + $url = (str_replace('{LOCALE}',\App\Models\Setting::getSettings()->locale, $warranty_lookup_url)); + $url = (str_replace('{SERIAL}', urlencode($this->model->serial), $url)); + $url = (str_replace('{MODEL_NAME}', urlencode($this->model->model->name), $url)); + $url = (str_replace('{MODEL_NUMBER}', urlencode($this->model->model->model_number), $url)); return $url; } diff --git a/resources/lang/en/admin/manufacturers/message.php b/resources/lang/en/admin/manufacturers/message.php index d6656683ae..8776358499 100644 --- a/resources/lang/en/admin/manufacturers/message.php +++ b/resources/lang/en/admin/manufacturers/message.php @@ -2,7 +2,7 @@ return array( - 'support_url_help' => 'Use {LOCALE} and {SERIAL} in your URL as variables to have those values auto-populate when viewing assets.', + 'support_url_help' => 'Variables {LOCALE}, {SERIAL}, {MODEL_NUMBER}, and {MODEL_NAME} may be used in your URL to have those values auto-populate when viewing assets - for example https://support.apple.com/{LOCALE}/{SERIAL}.', 'does_not_exist' => 'Manufacturer does not exist.', 'assoc_users' => 'This manufacturer is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this manufacturer and try again. ',