I needed to make a clone of a site. I bought a new license, duplicated the database and files, cleaned out the cache, updated all the paths and db credentials I could find, changed the license to match the new one, and began making changes. Everything seemed to be working, at first.
But if I edit a template, global variable, or snippet and then save/update, all angle brackets are converted to named entities, as though htmlspecialchars() was called prior to writing to the database.
All ‘<’ and ‘>’ are changed in a snippet, so that this:
<link rel=“stylesheet” href=”{stylesheet=global-embeds/global-styles}” media=“screen,projection” type=“text/css” /> is output, breaking the entire page.
In a template, it is more subtle.
This code is from the top of a fairly long and complex template. All the brackets displayed are converted until the first DIV, which is left alone.
{embed='global-embeds/preamble'}
{if meta-description}<meta name="description" content="{meta-description}" />{/if}
{global-stylesheets}
<style type="text/css">
{exp:channel:entries channel="pages" url_title="{last_segment}"}
#content h1 {
background: url({if header-image == ''}
{exp:categories category_group_id="4" {if segment_3 == ''} url_title="{segment_2}"{if:else} url_title="{segment_3}"{/if}}
{if category_image == ''}/images/01/awaiting-image.jpg{if:else}{category_image}{/if}{/exp:categories}{if:else}{header-image}{/if}) no-repeat 0 0;
}
{/exp:channel:entries}
</style>
</head>
<body id="company">
{header}
<div id="content" role="main">What is going on?!