metacpan-web icon indicating copy to clipboard operation
metacpan-web copied to clipboard

POD renders HTML format differently in release from the pod2html endpoint

Open zmughal opened this issue 2 years ago • 0 comments

Describe the bug

The =for html part of the POD for https://metacpan.org/release/ZMUGHAL/AI-TensorFlow-Libtensorflow-0.0.4/view/lib/AI/TensorFlow/Libtensorflow/Manual/InferenceUsingTFHubMobileNetV2Model.pod#Run-the-model-for-inference displays the contents of the HTML format block as HTML code instead of letting it pass through.

This occurs at the blocks that are formatted as:

=for html <span><pre><code>...

(Aside, these blocks are ANSI escapes converted to HTML which might be nice to have rendered in colour, i.e., not strip out the style="color: ....;" attributes. It works with pod2html.)

To Reproduce Steps to reproduce the behavior:

  1. Go to https://metacpan.org/release/ZMUGHAL/AI-TensorFlow-Libtensorflow-0.0.4/view/lib/AI/TensorFlow/Libtensorflow/Manual/InferenceUsingTFHubMobileNetV2Model.pod#Run-the-model-for-inference
  2. Search for <span>. It occurs throughout the rendered POD.
  3. Go to the raw POD source: https://fastapi.metacpan.org/source/ZMUGHAL/AI-TensorFlow-Libtensorflow-0.0.4/lib/AI/TensorFlow/Libtensorflow/Manual/InferenceUsingTFHubMobileNetV2Model.pod
  4. Select all and copy into the box at https://metacpan.org/pod2html and hit Render.
  5. Search for <span>. The <span> is not in the rendered POD.

Expected behavior

The renderer should not modify the =for html part of the POD (beyond the HTML::Restrict parts needed).

Screenshots

Left image is the /release/.../view/ page and the right is the /pod2html page:

image

Desktop (please complete the following information):

  • OS: GNU/Linux
  • Browser Mozilla Firefox
  • Version 108

zmughal avatar Dec 21 '22 21:12 zmughal