Copying code into head causes Wappler to break the code

Copying code into head causes Wappler to break the code

Normally it should not break, what kind of code was pasted in the head and what exactly happened after that?

Hi Patrick

I try to copy and paste this code

<?php require_once('../Connections/swfDbConnection.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php
$rsMetaWebsite = new WA_MySQLi_RS("rsMetaWebsite",$swfDbConnection,1);
$rsMetaWebsite->setQuery("SELECT website.* FROM website WHERE website.WEBSITEID = 1");
$rsMetaWebsite->execute();
?>
<?php
$rsMetaHauptrubrik = new WA_MySQLi_RS("rsMetaHauptrubrik",$swfDbConnection,1);
$rsMetaHauptrubrik->setQuery("SELECT website_hauptrubriken.* FROM website_hauptrubriken WHERE website_hauptrubriken.WHRID = 4");
$rsMetaHauptrubrik->execute();?>
<?php
$rsMetaRubrik = new WA_MySQLi_RS("rsMetaRubrik",$swfDbConnection,1);
$rsMetaRubrik->setQuery("SELECT website_rubriken.* FROM website_rubriken WHERE website_rubriken.WRID = 16");
$rsMetaRubrik->execute();
?>
<!doctype html>
<html lang="de" xmlns:og="https://opengraphprotocol.org/schema/" xmlns:fb="https://www.facebook.com/2008/fbml"><head>
<title><?php echo($rsMetaRubrik->getColumnVal("Rubrik")); ?></title>
<!-- Facebook -->
<meta property="fb:app_id" content="<?php echo($rsMetaWebsite->getColumnVal("FB_app_id")); ?>">
<meta property="og:title" content="<?php echo($rsMetaRubrik->getColumnVal("RubrikTitel")); ?>">
<meta property="og:url" content="https://www.naturama.ch/schulen/unterrichtsmaterial.php">
<meta property="og:image" content="https://www.naturama.ch/uploads/images/rubriken/headerfotos/mobile/<?php echo($rsMetaRubrik->getColumnVal("RHeaderFotoMobile")); ?>">
<meta property="og:site_name" content="<?php echo($rsMetaWebsite->getColumnVal("WebsiteTitel")); ?>">
<meta property="og:type" content="article">
<meta property="og:description" content="<?php echo htmlspecialchars($rsMetaRubrik->getColumnVal("META_Description") ? $rsMetaRubrik->getColumnVal("META_Description") : $rsMetaHauptrubrik->getColumnVal("META_Description")); ?>">
<!--/ Facebook -->
<!-- Required meta tags -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="<?php echo htmlspecialchars($rsMetaRubrik->getColumnVal("META_Description") ? $rsMetaRubrik->getColumnVal("META_Description") : $rsMetaHauptrubrik->getColumnVal("META_Description")); ?>">
<meta name="keywords" content="<?php echo($rsMetaRubrik->getColumnVal("META_Keywords") ? $rsMetaRubrik->getColumnVal("META_Keywords") : $rsMetaHauptrubrik->getColumnVal("META_Keywords")); ?>">
<meta name="design" content="<?php echo($rsMetaWebsite->getColumnVal("META_Design")); ?>">
<meta name="author" content="<?php echo($rsMetaWebsite->getColumnVal("META_Author")); ?>">
<meta name="publisher" content="<?php echo($rsMetaWebsite->getColumnVal("META_Publisher")); ?>">
<meta name="copyright" content="<?php echo($rsMetaWebsite->getColumnVal("META_Copyright")); ?>">
<meta name="Content-Language" content="de">
<meta name="robots" content="<?php echo($rsMetaWebsite->getColumnVal("META_Robots")); ?>">

And wappler is rewriting it into:

<head>
  <base href="/schulen/">
  <title>&lt;!--&lt;?php echo($rsMetaRubrik-&gt;getColumnVal("Rubrik")); ?&gt;--&gt;</title>
  <!-- Facebook -->
<meta property="fb:app_id" content="<!--<?php echo($rsMetaWebsite->getColumnVal(&quot;FB_app_id&quot;)); ?>-->">
<meta property="og:title" content="<!--<?php echo($rsMetaRubrik->getColumnVal(&quot;RubrikTitel&quot;)); ?>-->">
<meta property="og:url" content="https://www.naturama.ch/schulen/rubrik.php?wrid=<!--<?php echo $_GET['wrid'];?>-->">
<meta property="og:image" content="https://www.naturama.ch/uploads/images/rubriken/headerfotos/mobile/<!--<?php echo($rsMetaRubrik->getColumnVal(&quot;RHeaderFotoMobile&quot;)); ?>-->">
<meta property="og:site_name" content="<!--<?php echo($rsMetaWebsite->getColumnVal(&quot;WebsiteTitel&quot;)); ?>-->">
<meta property="og:type" content="article">
<meta property="og:description" content="<!--<?php echo htmlspecialchars($rsMetaRubrik->getColumnVal(&quot;META_Description&quot;) ? $rsMetaRubrik->getColumnVal(&quot;META_Description&quot;) : $rsMetaHauptrubrik->getColumnVal(&quot;META_Description&quot;)); ?>-->">
<!--/ Facebook -->
<!-- Required meta tags -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="<!--<?php echo htmlspecialchars($rsMetaRubrik->getColumnVal(&quot;META_Description&quot;) ? $rsMetaRubrik->getColumnVal(&quot;META_Description&quot;) : $rsMetaHauptrubrik->getColumnVal(&quot;META_Description&quot;)); ?>-->">
<meta name="keywords" content="<!--<?php echo($rsMetaRubrik->getColumnVal(&quot;META_Keywords&quot;) ? $rsMetaRubrik->getColumnVal(&quot;META_Keywords&quot;) : $rsMetaHauptrubrik->getColumnVal(&quot;META_Keywords&quot;)); ?>-->">
<meta name="design" content="<!--<?php echo($rsMetaWebsite->getColumnVal(&quot;META_Design&quot;)); ?>-->">
<meta name="author" content="<!--<?php echo($rsMetaWebsite->getColumnVal(&quot;META_Author&quot;)); ?>-->">
<meta name="publisher" content="<!--<?php echo($rsMetaWebsite->getColumnVal(&quot;META_Publisher&quot;)); ?>-->">
<meta name="copyright" content="<!--<?php echo($rsMetaWebsite->getColumnVal(&quot;META_Copyright&quot;)); ?>-->">
<meta name="Content-Language" content="de">
<meta name="robots" content="<!--<?php echo($rsMetaWebsite->getColumnVal(&quot;META_Robots&quot;)); ?>-->“>

I raised this issue some time last year. I can’t find the thread and I think the issue was at least partly addressed after that. However, there was still a problem mentioned in this thread.

Looking at @swf 's examples, perhaps the behaviour has reverted to when I first mentioned it. I have raised related issues a few times (the last time a week or so ago).