[PATCH] Removing a newline to fix XHTML formatting

Shawn Wells shawn at redhat.com
Mon May 6 23:19:01 UTC 2013


On 5/6/13 4:45 PM, Maura Dailey wrote:
> '<fix>' tags were surrounded with newlines in the final XHTML, which made formatting
> and padding uneven. This tiny fix leaves the initial and final newlines, but doesn't
> add additional newlines to the end of the body of the fix block. The resulting XHTML
> looks a little strange in source but displays properly.
>
> It's possible to remove the newline in the first out.write() call to create a neater
> solution in source with no surrounding blank lines at all, but this requires that the
> XSL transforms which create the final XHTML guide to be edited as well. (The <code>
> tags normally inserted by the XSL transforms for <fix> tags in dbout.html for
> db:programlisting have to be removed.)
>
> Signed-off-by: Maura Dailey <maura at eclipse.ncsc.mil>
> ---
>   RHEL6/transforms/combinefixes.py |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/RHEL6/transforms/combinefixes.py b/RHEL6/transforms/combinefixes.py
> index 307cac3..f9d8b7f 100755
> --- a/RHEL6/transforms/combinefixes.py
> +++ b/RHEL6/transforms/combinefixes.py
> @@ -32,7 +32,7 @@ def main():
>                   body = body + encode(f.read())
>               fixName = os.path.splitext(filename)[0]
>               out.write("<fix rule=\""+fixName+"\">\n")
> -            out.write(body+"\n")
> +            out.write(body.rstrip())
>               out.write("</fix>\n")
>   
>       out.write(fixGroupFooter)
> @@ -45,7 +45,7 @@ def main():
>                   body = body + encode(f.read())
>               fixName = os.path.splitext(filename)[0]
>               out.write("<fix-common id=\""+fixName+"\">\n")
> -            out.write(body+"\n")
> +            out.write(body.rstrip())
>               out.write("</fix-common>\n")
>   
>       out.write(fixCommonGroupFooter)


Nice fix! Ack (and thanks!).


More information about the scap-security-guide mailing list