Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5713~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5713
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 1, 2025

  1. doc: Warn that ts_headline() output is not HTML-safe.

    Add a documentation warning to ts_headline() pointing out that, when
    working with untrusted input documents, the output is not guaranteed
    to be safe for direct inclusion in web pages. This is because, while
    it does remove some XML tags from the input, it doesn't remove all
    HTML markup, and so the result may be unsafe (e.g., it might permit
    XSS attacks).
    
    To guard against that, all HTML markup should be removed from the
    input, making it plain text, or the output should be passed through an
    HTML sanitizer.
    
    In addition, document precisely what the default text search parser
    recognises as valid XML tags, since that's what determines which XML
    tags ts_headline() will remove.
    
    Reported-by: Richard Neill <richard.neill@telos.digital>
    Author: Dean Rasheed <dean.a.rasheed@gmail.com>
    Reviewed-by: Noah Misch <noah@leadboat.com>
    Backpatch-through: 13
    deanrasheed committed May 1, 2025
    Configuration menu
    Copy the full SHA
    d73d4cf View commit details
    Browse the repository at this point in the history
Loading