Преглед изворни кода

fix(text): add missing escape in base64 regex

Regex requires / to be escaped in character groups.

Noted on PR #3457
Jason Rumney пре 10 месеци
родитељ
комит
056b4b6662
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      custom_components/tuya_local/text.py

+ 1 - 1
custom_components/tuya_local/text.py

@@ -60,7 +60,7 @@ class TuyaLocalText(TuyaLocalEntity, TextEntity):
         if self._value_dp.rawtype == "hex":
             self._attr_pattern = "[0-9a-fA-F]*"
         elif self._value_dp.rawtype == "base64":
-            self._attr_pattern = "[-A-Za-z0-9+/]*={0,3}"
+            self._attr_pattern = "[-A-Za-z0-9+\/]*={0,3}"
         # TODO: general pattern support
 
         if hasattr(self, "_attr_pattern"):