Opened 12 years ago

Closed 10 years ago

#1047 closed defect (inactive)

<hr> inside <p>

Reported by: guest Owned by: gogo
Priority: normal Milestone: 0.96
Component: Xinha Core Version:
Severity: normal Keywords: <hr> hr invisible missing text
Cc:

Description

Using IE and creating a horizontal line (with all the html editors I've tried) can end up with the <hr> inside <p> </p> which causes an invisible text problem using IE when the edited page is later viewed as an html page.

It looks like someone tried to fix it in xinha because if you click view source and see the problem, click back to view html, if fixes it (going back in to view source shows the <hr> outside of the <p></p>).

However, the fix isn't applied if Apply is pressed and the webpage can end up with the invisible text problem.

Change History (3)

comment:1 Changed 11 years ago by ray

  • Milestone set to 0.96

comment:2 Changed 11 years ago by guest

in DOMwalk.js:

    case 9: // Node.DOCUMENT_NODE
...
      else if ( outputRoot ) 
      { //begin hr and table out of p 
        if (root.parentNode.tagName)
          if ( (" table hr ".indexOf(""+root_tag+" ") != -1) && (root.parentNode.tagName.toLowerCase()=="p") )
            html += "</p>"
        //end hr and table out of p 
      }
...
        //begin hr and table out of p  2nd part
        if (root.parentNode)
          if (root.parentNode.tagName)
            if ((" table hr ".indexOf(""+root_tag+" ") != -1) && (root.parentNode.tagName.toLowerCase()=="p"))
              html += "<p>"
        //end hr and table out of p 2nd part
      }
    break;

    case 3: // Node.TEXT_NODE

getHTML at the end of editing clean up that mistake

by gocher

comment:3 Changed 10 years ago by gogo

  • Resolution set to inactive
  • Status changed from new to closed

Attach a diff and it shall be committed.

Note: See TracTickets for help on using tickets.