Skip to content

Commit

Permalink
Fix code scanning alert no. 3: Incomplete string escaping or encoding
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
loftwah and github-advanced-security[bot] authored Dec 9, 2024
1 parent bc518e3 commit 8486012
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/open_graph_image_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,6 @@ def download_image(url)
end

def escape_text(text)
text.gsub("'", "\\'")
text.gsub("\\", "\\\\\\").gsub("'", "\\\\'")
end
end

0 comments on commit 8486012

Please sign in to comment.