<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>22664</bug_id>
          
          <creation_ts>2008-12-04 16:52:16 -0800</creation_ts>
          <short_desc>Rename and review uses of parseURL()</short_desc>
          <delta_ts>2023-12-28 08:09:54 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>annevk</cc>
    
    <cc>darin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101413</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-12-04 16:52:16 -0800</bug_when>
    <thetext>*SUMMARY
Bug 11850 Comment #4 quoting Darin Adler:

Here&apos;s what parseURL does:

    1) Strip leading and trailing spaces.
    2) Strip URL() if it surrounds the string, allowing any mix of uppercase and lowercase.
    3) Strip leading and trailing spaces.
    4) Strip balanced single or double quotes.
    5) Strip leading and trailing spaces.
    6) Strip all characters in the range U+0000-U+000C

It&apos;s very strange that we want to do this anywhere except in CSS. In fact, I
think it&apos;s a bug almost every where this function is used. Perhaps some of this
is needed but obviously (2) is something specific to CSS property values even
if some of the other behavior is useful.

Someone should create some tests cases and investigate the behavior of other
web browsers for the various places we call this function. And at the same time
we should probably rename it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101414</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-12-04 16:53:46 -0800</bug_when>
    <thetext>I think parseURL() should be renamed to parseCSSURL() (or parseURLForCSS()) and moved to be in KURL.h/KURL.cpp.  (That gets rid of CSSHelper.cpp, leaving only CSSHelper.h with a few constants.)

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101420</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-12-04 17:01:40 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; I think parseURL() should be renamed to parseCSSURL() (or parseURLForCSS()) and
&gt; moved to be in KURL.h/KURL.cpp. (That gets rid of CSSHelper.cpp, leaving only
&gt; CSSHelper.h with a few constants.)

I agree that parseCSSURL is a good name. But I don&apos;t think KURL.h is the header for this. It&apos;s not about URL handling, but rather about the CSS syntax for URL properties. I think the right header for this would be CSSParser.h.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2002144</commentid>
    <comment_count>3</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-12-28 08:09:54 -0800</bug_when>
    <thetext>This has been refactored.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>