Skip to content
Snippets Groups Projects
  • Jared Hancock's avatar
    cd538a8f
    Fix image CID rewrite for some pasted images · cd538a8f
    Jared Hancock authored
    Copy+Pasting images from a ticket thread or from a FAQ article to the HTML
    editor and submitting will result in the URL *not* being properly rewritten
    for storage in the database. When images are uploaded, a relative URL is
    returned from the server and embedded in the HTML editor. However, when
    images from the system are copy and pasted into the editor, an absolute URL
    with the http:// scheme is included. This URL was not properly handled by
    the URL rewriter in Format::localizeInlineImages().
    
    This patch addresses the issue by properly handling both relative URLs from
    image uploads and absolute URLs from copy and pasting.
    cd538a8f
    History
    Fix image CID rewrite for some pasted images
    Jared Hancock authored
    Copy+Pasting images from a ticket thread or from a FAQ article to the HTML
    editor and submitting will result in the URL *not* being properly rewritten
    for storage in the database. When images are uploaded, a relative URL is
    returned from the server and embedded in the HTML editor. However, when
    images from the system are copy and pasted into the editor, an absolute URL
    with the http:// scheme is included. This URL was not properly handled by
    the URL rewriter in Format::localizeInlineImages().
    
    This patch addresses the issue by properly handling both relative URLs from
    image uploads and absolute URLs from copy and pasting.