def replace_html(index):
  """Formats html.

  Args:
    index: index html content

  Returns:
    Modified index.html content
  """

  body = """  [[clicktag_layer]]
<script>
  var clickTag = "[[clicktag_url]]";
</script>
<script data-exports-type="dclk-quick-preview">if(typeof studio !== "undefined" && studio.Enabler) { studio.Enabler.setRushSimulatedLocalEvents(true); }
</script>
<script>
window.top.postMessage({ msg: "adcase", format:"footerFixed", params: { height: [[height]], type:"standard", action:"setup" }}, "*");
</script>
</body>"""

  head = "<head><meta name=\"ad.size\" content=\"width=[[width]],height=[[height]]\">"

  index = index.replace("<meta name=\"ad.size\"", "<meta name=\"old.adsize\"")
  index = index.replace("<head>", head)
  index = index.replace("</body>", body)
  index = index.replace("<meta name=\"GCD\"", "<meta name=\"old.GCD\"")

  return index