Quantcast
Channel: WordPress.org Forums
Viewing all articles
Browse latest Browse all 46187

dandv on "[Plugin: Preserved HTML Editor Markup] FAQ? Does this plugin actually disable wpautop?"

$
0
0

Well, even though the plugin is enabled, <p> tags are still inserted.

I have the following code in the HTML editor of a page:

<p>We plan to be located ... Map below:</p>

<div id="mapdiv"></div>
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script>
map = new OpenLayers.Map("mapdiv");
map.addLayer(new OpenLayers.Layer.OSM());

//Set start centrepoint and zoom
var lonLat = new OpenLayers.LonLat( -122.4000, 37.5050 )
.transform(
new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
map.getProjectionObject() // to Spherical Mercator Projection
);
var zoom=10;
map.setCenter (lonLat, zoom);

</script>

<p>One would hope the location above would work...

...but if you look at the page source, you'll see <p> tags inserted where linebreaks used to be in the <script> section.

Maybe this is actually (currently) intended behavior, but it certainly breaks scripts.

There are actually <p> and br tags where there were no linebreaks at all:

<div id="mapdiv"></div>
<p> <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script>

I just want the "HTML" tab in the page editor to be raw HTML. No "smart" paragraph or line break crap; those should be reserved for the Visual editor.

How can I do this?


Viewing all articles
Browse latest Browse all 46187

Trending Articles