JackPGreen commented on PR #13678:
URL: https://github.com/apache/maven/pull/13678#issuecomment-6345931128

   > Nit: `maven.mdo` now has inconsistent `>` escaping — this new line uses 
`<project>` (both brackets HTML-escaped), while several existing 
descriptions in the same file use only `<` with a raw `>` (e.g. 
`<build>`, `<scm>`, `<plugin>`, 
`<groupId>:<artifactId>:<version>`).
   
   This isn't new, e.g.:
   
https://github.com/apache/maven/blob/f387510e08e77e82994fbff6f2bfbf793600a16a/api/maven-api-model/src/main/mdo/maven.mdo#L3151
   
   But I think this change just exposes the issue.
   
   > Please audit every `<...>` (where `>` is unescaped) within the newly 
added CDATA blocks and fix the escaping consistently.
   
   Audited using AI-generated command:
   ```
   % find . -type f -name '*.mdo' -exec perl -0777 -ne '
       while (/<!\[CDATA\[(.*?)\]\]>/sg) {
           $block = $1;
           $start = $-[0];
   
           $line = 1 + (substr($_, 0, $start) =~ tr/\n/\n/);
   
           @lines = split /\n/, $block, -1;
           for ($i = 0; $i < @lines; $i++) {
               print "$ARGV:" . ($line + $i) . ": $lines[$i]\n"
                   if $lines[$i] =~ /[<>]/ && $lines[$i] =~ /&(?:lt|gt);/;
           }
       }
   ' {} +
   ```
   
   Fixed in fcbc1eb2272e34d96c11bb6cd896fedd01a8455c.
   
   I was _not_ able to reproduce this failure locally (e.g. `mvn package site 
-DskipTests` completes unexceptionally) to validate further, so 🤞 for CI result.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to