Home » Incidencias » 156
Sometimes links work and sometimes they don't
submitted by lammi87, 05:34, 17 Septiembre 2012
ARGUMENTO: maybe a bug
ESTADO: closed
PRIORIDAD: medium
Descripción:

Hi, this is lammi87.

When I make links in the device's description section, talk pages or in the wiki, sometimes they work and sometimes they don't. Here are some examples:

  • http://h-node.org/notebooks/view/en/632/Vostro-3300/1/1/undef/undef/undef/undef/undef/undef/undef/vostro%203300

  • link

  • http://h-node.org/notebooks/catalogue/en/1/1/undef/A-platinum/undef/undef/undef/undef/undef/undef

  • link (code for this link: [a]http://h-node.org/notebooks/catalogue/en/1/1/undef/A-platinum/undef/undef/undef/undef/undef/undef| link[/a])

  • Do you have any idea why this happens?

    Mensajes:
    tonicucoz:

    It is a problem of the regular expression used to find the URLs. Here is the current reg expression:

    /^http(s)?\:\/\/(www\.)?[a-zA-Z0-9\-\_]+(\.[a-zA-Z0-9\-\_]+)*\.([a-z]{2,4})((\/[a-zA-Z0-9\_\.\-\:\+]+)*(\/([a-zA-Z0-9\_\:\-\.\+]+\.(php|html|htm|asp|aspx|jsp|cgi))?)?)?(\?([a-zA-Z0-9\_\-\+\s]+\=[a-zA-Z0-9\_\-\s\+\&]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/

    I have to try to understand where the URLs indicated by you do not comply with this regular expression. I will try to improve it. Thanks

    submitted by tonicucoz, 10:52, 17 Septiembre 2012
    tonicucoz:
    the problem is %,.. it added by the browser because there is an empty space (the browser adds %20)
    submitted by tonicucoz, 02:08, 18 Septiembre 2012
    lammi87:
    I was wondering if % were the problem. Good you found it. Can you fix it? This is a small but annoying problem,
    submitted by lammi87, 02:41, 19 Septiembre 2012
    greenman:
    This appears to be working now. If not, please specify a more detailed way to repeat (browser version etc).
    submitted by greenman, 18:35, 28 Julio 2016

    Write below your motivation

    h-node.org is a hardware database project. It runs the h-source PHP software, commit cdeda15, available under the GNU General Public (GPLv3) License.
    JavaScript license information