Image linking behavior

General Discussion
  • #1

    Hello everyone. I'm hoping someone can enlighten me about some behavior of topic replies.

    I have enabled html replies on my forum in order to enable images being shown and resized easily by the users.

    here is an example of some code that reproduces the problem.

    <img src="" width="50%" height="50%" >

    If i create a reply with this as the code or load a topic containing images they will clickable and open the image in a new tab. However if I edit the reply and don't change anything in the above code and submit it again the image is no longer clickable.

    Is there a good reason for this behavior? I would prefer if the image was always only clickable if I coded something enabling it.

  • #2

    @nodecurious said:

    I have enabled html replies on my forum

    <iframe src=" other extension"></iframe>

    Game over.

    Just set a max width and height with css. Don't leave your forum open to malicious attacks so someone can post a slightly bigger picture of their cat.

    Alternatively don't, and give us the URL so I can blacklist it on my router so I never accidentally visit it. 👍

  • #3

    @a_5mith I do realize that it is dangerous. Currently it is not hosted anywhere so don't worry about that. I'm simply messing around with NodeBB locally to see what it is all about.

    It also happens when you use markdown for showing the image.

  • #4

    @nodecurious either way. Set a max width and height in css and be done with it. Alternatively there's a plugin somewhere that lets you add height and width. As for the clickable image. Sounds like a bug with the link to full screen. 🙂

  • #5

    It must have something to do with the autolinker plugin which automatically adds tags to URLs. The files autolinker.js and remarkable.js both have options in them regarding default URL's and whether or not they should be opened in a new window. I have tried changing the values to false and restarting the server but it did not work.

    Does anyone have experience with how autolinker gets its configuration?


    Autoconvert url-like texts to links is not ticked in markdowns plugin page.

    I also tried having a look at remarkable and linkify but nothing has stopped having imgur links automatically tagged with <a href..... /a>

  • Global Moderator Plugin & Theme Dev


Suggested Topics

| | | |