View Single Post
Old 05-11-2013, 01:40 PM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Does <blockquote> need <p> tags?

Does <blockquote> need <p> tags? I've seen the <p>-less constructs many times cleaning up PD books, so it seems to be a common thing.

This displays OK in Sigil, but the <p>-less <blockquote> generates a "no character data is allowed by content model". I usually try to eliminate as many errors as possible even if they don't matter, just to avoid missing an important one.

Code:
<body>
  <p>This is OK text with p tags</p>

  <blockquote>
    This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags
  </blockquote>

  <blockquote>
    <p>This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags</p>
  </blockquote>

  <p>This is OK text also with p tags</p>
</body>
I did try some variations of a RegEx, but no luck (this is also a learning area for me)

F: (<blockquote>)!(<p>)(.*)!(</p>)(</blockquote>)
R: <blockquote><p>\3</p><blockquote>

Making sure that there's a question,

1. Are <p> required?
2. What would be the correct RegEx to use so as to avoid the error messages?

Paul
phossler is offline   Reply With Quote