Blesta Addons Posted October 26, 2014 Report Posted October 26, 2014 is safe to add url in language definition ? or it should done via another way ? i want to return a message(error/success) from language file , that containa a url in the message . what is the correct code ? native html or a custom BBCODE ? Quote
Tyson Posted October 27, 2014 Report Posted October 27, 2014 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). Quote
niyo Posted March 4, 2015 Report Posted March 4, 2015 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 Quote
Tyson Posted March 4, 2015 Report Posted March 4, 2015 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? Quote
niyo Posted March 5, 2015 Report Posted March 5, 2015 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.