Skip to main content

add_nonce_to_inline_scripts

Function add_nonce_to_inline_scripts 

Source
pub fn add_nonce_to_inline_scripts(html: &str, nonce: &str) -> String
Expand description

Adds nonce="..." to all inline <script> tags (those without a src= attribute). External scripts (<script src="...">) are left untouched.