Announcement

Collapse
No announcement yet.

about: regular expression incorrect?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • about: regular expression incorrect?

    I typed a sentence on my forum... short and sweet:

    "What about_: XXXX"

    And an underline appeared as if by magic betwixt "about" and ":".
    London Fixed-gear and Single-speed

  • #2
    Look! It's done it here too

    Is this an escaping thing to detect about:blank and other such things? Can it be made less aggressive?
    London Fixed-gear and Single-speed

    Comment


    • #3
      The location bar options are parsed and linked when the post is posted.

      Before you press submit, uncheck: [x] Automatically parse links in text

      about about:

      Comment


      • #4
        Oh, lol! That did not help.

        Maybe you found a bug?

        Comment


        • #5
          Originally posted by floris
          Maybe you found a bug?
          Scary huh! That's not like me at all.
          London Fixed-gear and Single-speed

          Comment


          • #6
            about_:

            ?

            intresting, maybe somthing in how the wysiwyg is parsed

            Comment


            • #7
              this is from a plain text box:

              about:
              London Fixed-gear and Single-speed

              Comment


              • #8
                Well it's not just because of the full WYSIWYG stuff... the plain text entry does it too.

                So it must be a regexp in the back end code that does it.

                It's lines 505 through 508 of functions_bbcodeparse.php:

                PHP Code:
                    // parse out nasty active scripting codes
                    
                static $global_find = array('/javascript:/si''/about:/si''/vbscript:/si''/&(?![a-z0-9#]+;)/si');
                    static 
                $global_replace = array('java_script_:''about_:''vb_script_:''&');
                    
                $bbcode preg_replace($global_find$global_replace$bbcode); 
                The replacements are overly aggressive, as it shouldn't necessarily perform that everywhere as my example shows. Maybe a check on the context?
                London Fixed-gear and Single-speed

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...
                X