Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Qt.io webservices
  4. Can't put HTML/JavaScript example code in the Wiki (even inside @@)
Forum Update on Monday, May 27th 2025

Can't put HTML/JavaScript example code in the Wiki (even inside @@)

Scheduled Pinned Locked Moved Qt.io webservices
7 Posts 3 Posters 3.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thp4
    wrote on last edited by
    #1

    While writing a HOWTO for QtWebKit, I noticed that the wiki removes certain JavaScript-y content from my submissions - i.e. a script tag gets replaced with "[removed]". The same is true for dot innerHTML (I can't write it out, as it gets replaced even here in the forum).

    Can you please leave content between at-at as-is or escape it so that its appearance on the wiki will be the same as in the source text between at-at, because this is usually what developers want :)

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gurudutt
      wrote on last edited by
      #2

      For security reason, our system try to change all possible executable codes on to some string or removes it.

      Release Manager - Qt Development Frameworks

      1 Reply Last reply
      0
      • T Offline
        T Offline
        thp4
        wrote on last edited by
        #3

        [quote author="Gurudutt" date="1291292154"]For security reason, our system try to change all possible executable codes on to some string or removes it.[/quote]

        Security? "You are doing it wrong.":http://bugreports.qt.nokia.com/browse/QTWEBSITE-113 (No offense :))

        Just escape user input properly - that works and is secure. Also then, legitimate uses of JavaScript-like content won't be messed up, but just displayed as-is on the Forum and Wiki.

        Usually, it's enough to escape the angle brackets (less-than and greater-than) and the ampersand.

        1 Reply Last reply
        0
        • X Offline
          X Offline
          xsacha
          wrote on last edited by
          #4

          I think if you can change the javascript to '[removed]' you can also change it to something else that isn't harmful but keeps the original intent. I originally thought it was just in text but in code too? Why?

          It's pretty bad to knock out javascript when a big part of this forum and wiki is about using javascript in QtQuick.

          • Sacha
          1 Reply Last reply
          0
          • T Offline
            T Offline
            thp4
            wrote on last edited by
            #5

            [quote author="xsacha" date="1291304330"]I think if you can change the javascript to '[removed]' you can also change it to something else that isn't harmful but keeps the original intent. I originally thought it was just in text but in code too? Why?

            It's pretty bad to knock out javascript when a big part of this forum and wiki is about using javascript in QtQuick.[/quote]

            If you just "htmlspecialchars" (or the equivalent of what language you use for your web stuff) the code parts and leave them otherwise untouched, this should work. No need to try to "detect" dangerous Javascript and hide it or replace it with something.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              thp4
              wrote on last edited by
              #6

              Any chance of getting this fixed? Or should I file a separate bug report / feature request?

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gurudutt
                wrote on last edited by
                #7

                [quote author="thp" date="1291394347"]Any chance of getting this fixed? Or should I file a separate bug report / feature request?[/quote]

                I have created issue about it for rethinking things and the way we are handling this.
                It may take some time to come back with fixe, since we have to decide it first and if decided something then implement it.

                Release Manager - Qt Development Frameworks

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved