• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Relative links

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I�m trying to post relative links in my forum, without putting the domain, so, even if the ip of the server changes, my link will still remain valid.

I would like to post something like this



But, when I post, JFORUM saves something like

and loses the link

This happens in the last version I got from cvs, in my original versio this didn�t happen, so, the problem seems like to be caused for some new alteration.

Note: If I put "http:" in the link, JFORUM understands correctly.

Even checking and unchecking the options of Disable HTML and Disable BB Code the problem remains the same

Could anybody help me please?

PS.: This message has the option "Disable HTML in this message" checked





[originally posted on jforum.net by mandy_varel]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An example here in this forum:

An example:
Click Here

You see? Here in JFORUM.net this happens too.

PS.: This message has the option "Disable HTML in this message unchecked"

[originally posted on jforum.net by mandy_varel]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

mandy_varel wrote:I�m trying to post relative links in my forum, without putting the domain, so, even if the ip of the server changes, my link will still remain valid.


The answer is not to use IP addresses. You can either purchase a domain name from a registar like GoDaddy, or use a free service like DynDNS to obtain a subdomain.
[originally posted on jforum.net by jbanes]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well.. thanks for the suggestion, but I would like my application to be very flexible.

I�ve found the solution

Some tags were removed in the Class

classes\net\jforum\util\SafeHtml.class

So, I replaced the new version with my old version of this class (that worked as I expected). Fortunately everything worked fine.
[originally posted on jforum.net by mandy_varel]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

mandy_varel wrote:I�ve found the solution


Be warned that you've just opened up a potentially major security hole. The SafeHTML class removes dangerous tags, thus why you weren't able to post a relative path. You should be fine if you don't ever turn on HTML support, but there are no guarantees.

Just a fair warning.
[originally posted on jforum.net by jbanes]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm adding a new configuration key, named "html.links.allow.relative" and defaults to false, to handle this.

All relative links should start with / and not have any ":" symbol inside.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic