Skip to main content

inject_before_body_close

Function inject_before_body_close 

Source
pub fn inject_before_body_close(html: &str, script: &str) -> String
Expand description

Inject script immediately before the closing </body> tag in html.

The search is case-insensitive (</BODY> and </body> both match). If html has no closing body tag, the script is appended.