pub fn add_nonce_to_inline_scripts(html: &str, nonce: &str) -> String
Adds nonce="..." to all inline <script> tags (those without a src= attribute). External scripts (<script src="...">) are left untouched.
nonce="..."
<script>
src=
<script src="...">