Add a script tag to HTML with JSoup preserve path tags
- by Bhuvnesh Pratap
I am adding a new script tag to my DOM with JSoup like this :
rootElement.after("<script src='<?=base_url()?>js/read.js'></script>")
but what I end up getting is this :
<script src="<?=base_url()?>js/read.js"></script>
I intend to preserve this
"<?=base_url()?>" and achieve something like:
<script src="<?=base_url()>js/read.js"></script>
string here , How could I do this ?