Skip to content

Commit

Permalink
Patch - Merge pull request #2324 from EricDunsworth/fieldflow-trim-au…
Browse files Browse the repository at this point in the history
…to-labels-values

Field flow: Trim auto-generated labels/values
  • Loading branch information
Garneauma authored Apr 2, 2024
2 parents 1fa80bb + 4cdcda5 commit d1fb4d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/wb-fieldflow/fieldflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ var componentName = "wb-fieldflow",
// Is firstNode an anchor?
if ( firstNode.nodeName === "A" ) {
itmValue = firstNode.getAttribute( "href" );
itmLabel = $( firstNode ).html();
itmLabel = $( firstNode ).html().trim();
j_len = 1; // Force following elements to be ignored

actions.push( {
Expand Down Expand Up @@ -834,7 +834,7 @@ var componentName = "wb-fieldflow",
// Remove nested structure in grouping (ul) and nesting (.wb-fieldflow-sub) scenarios
$itmCachedClean.children( "ul, .wb-fieldflow-sub" ).remove();

itmLabel = $itmCachedClean.html();
itmLabel = $itmCachedClean.html().trim();
}

// Set an id on the element
Expand Down

0 comments on commit d1fb4d2

Please sign in to comment.