exceptionfactory commented on code in PR #10679:
URL: https://github.com/apache/nifi/pull/10679#discussion_r2641377846
##########
nifi-frontend/src/main/frontend/apps/standard-content-viewer/src/app/pages/standard-content-viewer/feature/standard-content-viewer.component.ts:
##########
@@ -198,7 +198,20 @@ export class StandardContentViewer {
this.error = null;
this.contentLoaded = true;
- this.contentFormGroup.get('value')?.setValue(content);
+ // For XML, clean up formatting for display
+ let processedContent = content;
+ if (this.mimeTypeDisplayName === 'xml') {
+ // Add newline after XML declaration if missing
(<?xml ...?><root> -> <?xml ...?>\n<root>)
+ processedContent =
processedContent.replace(/\?></g, '?>\n<');
Review Comment:
Is this still needed?
##########
nifi-commons/nifi-xml-processing/src/main/java/org/apache/nifi/xml/processing/transform/StandardTransformProvider.java:
##########
@@ -91,6 +91,7 @@ public void transform(final Source source, final Result
result) {
transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD,
ProcessingAttribute.ACCESS_EXTERNAL_DTD.getValue());
transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET,
ProcessingAttribute.ACCESS_EXTERNAL_STYLESHEET.getValue());
transformerFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,
SECURE_PROCESSING_ENABLED);
+
Review Comment:
This newline can be reverted.
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/java/org/apache/nifi/web/controller/StandardContentViewerController.java:
##########
@@ -112,8 +112,6 @@ public void doGet(final HttpServletRequest request, final
HttpServletResponse re
final StandardTransformProvider transformProvider = new
StandardTransformProvider();
transformProvider.setIndent(true);
- transformProvider.setOmitXmlDeclaration(true);
-
Review Comment:
It seems like this change can be reverted.
--
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]