×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: URL in comment is not working

URL in comment is not working 14 years 6 months ago #9767

  • Jaime
  • Jaime's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0
Hello...

I have a problem when I place a URL in a comment. For example, this is stored in a comment in jos_comment table:

<a class="linkarticle" href="index.php?option=com_hum&view=proyecto&id=nn:yyy">link text</a>

But when the page is rendered, this is placed:

<a class="linkarticle" href="index.php?option=com_hum&view=proyecto&id=nn:yyy">link text</a>

That causes the final URL to contain a undesirable quote.

How can I solve it? I have JoomlaComment 4.0

Thanks
Jaime

URL in comment is not working 14 years 6 months ago #9768

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Jaime,
What you trying is a security risk. It is not clever to let users input html code on your site - they can make some pretty nasty stuff.
That is why in all kind of forums and comments you have bbcode.
In your case you just need write the url, selecte it and click the url button. Or just write
[url]
index.php?option=com_hum&view=proyecto&id=nn:yyy
[/url]
this will transform the text to <a href="index.php?option=com_hum&view=proyecto&id=nn:yyy">index.php?option=com_hum&view=proyecto&id=nn:yyy</a>

if you want to have text

then write
[url=index.php?option=com_hum&view=proyecto&id=nn:yyy] my text [/url]

and this will be transformed to <a href="index.php?option=com_hum&view=proyecto&id=nn:yyy">my text</a>
The following user(s) said Thank You: karthik

URL in comment is not working 14 years 6 months ago #9769

  • Jaime
  • Jaime's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0
Hello! thanks for answering... I did what you suggested, placing this:

[url=index.php?option=com_hum&view=proyecto&id=46:icomo-instalar-un-burlete]¿Cómo instalar un Burlete?????[/url]

But in the comment it appeared as:
link:index.php?option=com_hum&view=proyecto&id=46:icomo-instalar-un-bu rlete

The fact is that the administrator of the site needs to add some links that belongs to the same site when he answers the comment.

In order to do that, I created other administrator interface that allows to answer a post by mean of the control panel.

Can you tell me where in the code I need to modify so that the URL is not urlencoded when the comment is displayed??

Thanks a lot in advance,
Jaime

URL in comment is not working 14 years 6 months ago #9770

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Turn ubbcode support in the backend on and the link won't be displayed with link:inde...., but with <a> tags

URL in comment is not working 14 years 6 months ago #9776

  • Jaime
  • Jaime's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0
Thanks a lot... finally I have translated all HTML entities into BBCODE prior saving comment and it worked perfectly.

Cheers
Jaime

URL in comment is working 10 years 7 months ago #25751

  • karthik
  • karthik's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • www.steptoinstall.com
  • Posts: 1
  • Thank you received: 0
thanks Bro...

www.steptoinstall.com
  • Page:
  • 1
Time to create page: 0.195 seconds