1

I am using Civicrm plugin in wordpress. Civicrm javascripts auto generate with <p> tages.

Example code below:

<p><script language="javaScript" type="text/javascript"></p>
<p>    cj(function() {
        countryID       = "country-Primary"
        // sometimes we name != id, hence if element does not exists
        // fetch the id
        if ( cj( '#' + countryID ).length == 0 ) {
          countryID = cj( 'select[name="' + countryID + '"]' ).prop('id');
        }</p>

<p>        stateProvinceID = "billing_state_province_id-5"
        if ( cj( '#' + stateProvinceID ).length == 0 ) {
          stateProvinceID = cj( 'select[name="' + stateProvinceID + '"]' ).prop('id');
        }</p>
<p>        cj( '#' + countryID ).chainSelect(
          '#' + stateProvinceID,
          callbackURL,
          {
            before : function (target) {
              if (typeof(setdefault) === "undefined") { setdefault = new Array(); }
              targetid = cj(target).attr("id");
              eval('setdefault[targetid] = cj(target).val()');
            },
            after : function(target) {
              targetid = cj(target).attr("id");
              cj(target).val(setdefault[targetid]);
            }
          }
        );
    });</p>
<p>  </script></p>

How to remove the <p> tages from this script?

Thanks, Shivaji

Prabhu
  • 1,127
  • 1
  • 13
  • 30
  • @Govind Singh Nagarkoti : Once the plugin installed into wp, the script includes automatically – Prabhu Jun 17 '14 at 13:09

1 Answers1

1

It looks like you may have a WordPress plugin that is taking line breaks in page content and popping them into paragraphs. Try disabling other plugins and re-enabling them one-by-one and seeing if that works. Unfortunately, if it is another plugin, they may just be incompatible, or you might have to adjust its settings.

Andie Hunt
  • 705
  • 3
  • 8
  • Hi Shivaji, I'm hoping you can help create a CiviCRM StackExchange site by clicking on Commit at http://area51.stackexchange.com/proposals/77367/civicrm - we just need a few more people like you with over 200 reputation on a different SE site who are interested inCiviCRM to do it and we'll be able to launxh the Beta. Thanks! – Joe Murray Feb 24 '15 at 00:24