Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #5195: Escape bundle_name correctly #83

Merged

Conversation

VinceMacBuche
Copy link
Member

No description provided.

@@ -338,7 +338,8 @@ app.controller('ncf-builder', function ($scope, $modal, $http, $log, $location,
// Save a technique
$scope.saveTechnique = function() {
if ($scope.selectedTechnique.bundle_name === undefined) {
var bundle_name = $scope.selectedTechnique.name.replace(/ /g,"_");
// Replace all non alpha numeric character (\W is [^a-zA-Z_0-9]) by _
var bundle_name = $scope.selectedTechnique.name.replace(/\W/g,"_");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

ncharles added a commit that referenced this pull request Jul 4, 2014
@ncharles ncharles merged commit 7f3f08d into Normation:master Jul 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants