xoops forums

alain01

Just can't stay away
Posted on: 4/6 14:51
alain01
alain01 (Show more)
Just can't stay away
Posts: 481
Since: 2003/6/20
#1

bbcode and url

Hi,
I noticed a thing on the URL bbcode
Is it only for a standard URL ?

I explain the problem here:
I want to write only the absolute link from the root of the website

Example:
The URL is:
Quote:but I want to write
Quote:
/modules/xmnews/article.php?news_id = 35

BBCode turns this link into
Quote:
modules/xmnews/article.php?news_id=35
(Without "/")
so the link is bad.

A solution ?
- I should use an html link with an href = "" ?
- This BBCode only works for a standard URL ?
- Others?

alain01

Just can't stay away
Posted on: 4/6 15:45
alain01
alain01 (Show more)
Just can't stay away
Posts: 481
Since: 2003/6/20
#2

Re: bbcode and url

The source code given by my browser, for the last link is :
Quote:
<a href="http:///modules/xmnews/article.php?news_id=35" rel="noopener external" title="">


Note (from Greg)

/class/module.textsanitizer.php
may be @ line 410 (Replace XoopsCodes with their equivalent HTML formatting)

The url should not return a [http] word key if there is no http (or https) in the initial string

geekwright

Quite a regular
Posted on: 4/6 22:22
geekwright
geekwright (Show more)
Quite a regular
Posts: 315
Since: 2010/10/15
#3

Re: bbcode and url

Nothing new, here. This has been that way for a long time.

The url xoopscode tag expects a fully qualified URL. Partials lead to security exposures very quickly. There is no one size fits all way to resolve scheme-less URLs. XOOPS can for example work fine in a directory under a domain.

There is a siteurl tag which always prepends the full XOOPS_URL with a trailing slash. That is useful when transferring content between a prototype and a production system without changes.