Modified auto-fill preventing label obfuscation to inject '⁠' into all the words of the label

This commit is contained in:
Leah Schumann 2022-04-28 15:50:40 -04:00
parent 624bf4501b
commit 2c9264f2e6
3 changed files with 23 additions and 17 deletions

View file

@ -73,18 +73,22 @@ export default {
}, },
labelText: { labelText: {
get: function () { get: function () {
var thisQuestionText = ""; const noBreakChar = "⁠";
var questionText = "";
if (this.disableAutoFill) { if (this.disableAutoFill) {
var words = this.questionText.toString().split(/[ ]+/);
words.forEach(function (word) {
const position = 1;
word = [word.toString().slice(0, position), noBreakChar, word.toString().slice(position)].join('');
questionText += `${word} `;
});
const noBreakChar = "⁠"; questionText = questionText.trimEnd();
const position = 1;
thisQuestionText = [this.questionText.toString().slice(0, position), noBreakChar, this.questionText.toString().slice(position)].join('');
} else { } else {
thisQuestionText = this.questionText.toString(); questionText = this.questionText.toString();
} }
return thisQuestionText; return questionText;
} }
} }
}, },

View file

@ -91,18 +91,22 @@ export default {
}, },
labelText: { labelText: {
get: function () { get: function () {
var thisQuestionText = ""; const noBreakChar = "⁠";
var questionText = "";
if (this.disableAutoFill) { if (this.disableAutoFill) {
var words = this.questionText.toString().split(/[ ]+/);
words.forEach(function (word) {
const position = 1;
word = [word.toString().slice(0, position), noBreakChar, word.toString().slice(position)].join('');
questionText += `${word} `;
});
const noBreakChar = "⁠"; questionText = questionText.trimEnd();
const position = 1;
thisQuestionText = [this.questionText.toString().slice(0, position), noBreakChar, this.questionText.toString().slice(position)].join('');
} else { } else {
thisQuestionText = this.questionText.toString(); questionText = this.questionText.toString();
} }
return thisQuestionText; return questionText;
} }
} }
}, },

View file

@ -5,7 +5,7 @@
ref="theForm" ref="theForm"
v-slot="{ meta }" v-slot="{ meta }"
autocomplete="off" > autocomplete="off" >
<div class="container-fluid shadow rounded-3 p-2 position-relative make-tall"> <div class="container-fluid shadow rounded-3 p-2 position-relative make-tall px-5">
<funnelHeader cmsWidgetName="FunnelHeaderWidget" ref="funnelHeader" /> <funnelHeader cmsWidgetName="FunnelHeaderWidget" ref="funnelHeader" />
<vehicleBanner ref="vehicleBanner" :displayGenericVehicleImage=false /> <vehicleBanner ref="vehicleBanner" :displayGenericVehicleImage=false />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" ref="funnelSubHeader" /> <funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" ref="funnelSubHeader" />
@ -224,8 +224,6 @@ export default {
); );
// if the car entered is the same as the car found OR the glass options for the found car match the users damage selections // if the car entered is the same as the car found OR the glass options for the found car match the users damage selections
console.log(glassOptions.data);
console.log(store.getters.damage.glassToReplace);
if (carEntered.carId == carFound.carId || !compareGlassOptions(glassOptions.data, store.getters.damage.glassToReplace)) { if (carEntered.carId == carFound.carId || !compareGlassOptions(glassOptions.data, store.getters.damage.glassToReplace)) {
console.log("navigating to heritage funnel"); console.log("navigating to heritage funnel");
//navigateToHeritageFunnel(); //navigateToHeritageFunnel();