[ 
https://issues.apache.org/jira/browse/SCB-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16621970#comment-16621970
 ] 

ASF GitHub Bot commented on SCB-930:
------------------------------------

little-cui closed pull request #447: SCB-930 Make Regex more stringent to 
remove new line char from Schema
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/447
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js 
b/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
index 31b9a15c..ab24663a 100644
--- a/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
+++ b/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
@@ -146,7 +146,7 @@ angular.module('serviceCenter.sc')
                 httpService.apiRequest(url, method, null, headers, 
"nopopup").then(function(response) {
                     if (response && response.data && response.data.schema) {
                         $scope.template = response.data.schema;
-                        $scope.template = $scope.template.replace(/\\/g, "");
+                        $scope.template = $scope.template.replace(/\\\s/g, "");
                         $scope.json = YAML.parse($scope.template);
                         const ui = SwaggerUIBundle({
                             spec: $scope.json,
@@ -270,7 +270,7 @@ angular.module('serviceCenter.sc')
                                         var ip = highway[1].substring(2, 
highway[1].length) + ":" + highway[2].substring(0, 4);
                                     }
                                     var schema = response.data.schema;
-                                    schema = schema.replace(/\\/g, "");
+                                    schema = schema.replace(/\\\s/g, "");
                                     var json = YAML.parse(schema);
                                     json.basePath = "/testSchema" + 
json.basePath;
                                     json.instanceIP = ip;
@@ -306,4 +306,4 @@ angular.module('serviceCenter.sc')
 
 
         }
-    ]);
\ No newline at end of file
+    ]);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Service Center Frontend stops responding in Schema test if Schema has '\"' 
> character in the description
> -------------------------------------------------------------------------------------------------------
>
>                 Key: SCB-930
>                 URL: https://issues.apache.org/jira/browse/SCB-930
>             Project: Apache ServiceComb
>          Issue Type: Bug
>          Components: Service-Center
>    Affects Versions: service-center-1.0.0
>            Reporter: Mohammad Asif Siddiqui
>            Assignee: Mohammad Asif Siddiqui
>            Priority: Major
>             Fix For: service-center-1.1.0
>
>
> Service Center Frontend stops responding in Schema test if Schema has '\"' 
> character in the description.
> Solution :  Update the Regex for eliminating the new line character



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to