mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
PERF: Replace video and audio links in search blurb while indexing.
In the near future, we will be swtiching to PG headlines to generate the search blurb. As such, we need to replace audio and video links in the raw data used for headline generation. This also means that we avoid replacing links each time we need to generate the blurb.
This commit is contained in:
@ -24,6 +24,8 @@ module Discourse
|
||||
end
|
||||
|
||||
class Utils
|
||||
URI_REGEXP = URI.regexp(%w{http https})
|
||||
|
||||
# Usage:
|
||||
# Discourse::Utils.execute_command("pwd", chdir: 'mydirectory')
|
||||
# or with a block
|
||||
|
Reference in New Issue
Block a user