Files
brave-core/components/common/create_sanitized_image_url.ts
T
Pete Miller e56029c716 AI Chat: show web sources that were used via search to generate the response (#24560)
* AI Chat: show web sources that were used (normally via web search) to generate the response
* Persist WebSource events
* include upstream's sanitized_image_source in android builds
* database gets AssertLongCPUWorkAllowed();
2025-02-09 17:12:40 -08:00

12 lines
569 B
TypeScript

// Copyright (c) 2025 The Brave Authors. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.
// This simple string concat is made to a utility so it can be overriden in
// Storybook. The C++ WebUI must add either SanitizedImageSource or
// UntrustedSanitizedImageSource.
export default function createSanitizedImageUrl(imageUrl: string) {
return `//image?url=${encodeURIComponent(imageUrl)}`
}