Answer the question
In order to leave comments, you need to log in
Laravel, GET: how to process the link received from the user and pass it further in a human-readable form?
On one form (method='get') the user enters a link in the input, let's say, http://example.com
and submits the form (via submit).
Then it gets to the page where its link is in GET ( example.com ), as a result, the link of this page looks like this: ...?href=http%3A%2F%2Fexample.com
Tell me, at what stage and how is it better to replace "%3A%2F%2F" with "://" ?
Thank you!
view of the address receiving form:
{{ Form::open(array(
'route' => 'pageInfo',
'method' => 'get',
))
}}
<label>Укажите адрес страницы:</label>
<span>URL:</span>
<input type = 'url' name = 'href'>
<input type = 'submit' value = 'Запуск'/>
{{ Form::close() }}
Answer the question
In order to leave comments, you need to log in
suggested that the problem can be solved by redirects, the option is not suitable, but it seems like the only one.
If anyone managed to somehow overcome this - I will be glad to ideas.
this is standard behavior. for you, this is the url, and for the form, this is the text that needs to be escaped and url-encoded.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question