Jump to content

Is Safe To Add Url In Language Definition ?


Blesta Addons

Recommended Posts

A URL is just text, so it should be fine. But if you are creating an anchor tag around it, then you will need to escape any quotes, and make sure this language definition doesn't get filtered through Html::safe when it is referenced (not likely).

Link to comment
Share on other sites

  • 4 months later...

I'm hoping to do the same, but I'm no developer. What will the appropriate syntax be to include the following in a language file as a hyperlink:

 

<a href="https://domain.tld/directory/">Anchor Text</a>

 

I tried the following but it just output the above rather than a clickable link:

 

<a href=\"https://domain.tld/directory/\">Anchor Text</a>

 

Thanks

Link to comment
Share on other sites

If that language definition output the anchor as text, then it sounds like it is being output via Html::safe wherever it is displayed. What is the language definition term? Perhaps you may want to create a new definition altogether?

Link to comment
Share on other sites

Hi Tyson, thanks for your help, you were right it was being output via html::safe and testing it on a different term works. However, the place in which I want to use it is in a developers module and I have a feeling it is being output from one of the encoded files. I suspect this because the language definition is used in multiple places which I've been able to find and change bar a couple. I've been in touch with him to confirm this is the case, so changing the term may not be a viable option.

 

See configurable options here:

https://my.hostngo.co/order/config/index/hosting/?group_id=7&pricing_id=11

 

Is there a way to bypass html::safe?

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...