linkedin-secret-sauce 0.3.28 → 0.3.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/search-encoder.js +12 -1
- package/package.json +1 -1
|
@@ -41,7 +41,18 @@ function pushFilter(out, type, values) {
|
|
|
41
41
|
}
|
|
42
42
|
function buildLeadSearchQuery(keywords, filters) {
|
|
43
43
|
const kw = (filters?.boolean?.keywords ?? keywords ?? '').toString();
|
|
44
|
-
|
|
44
|
+
// Manually encode characters that encodeURIComponent doesn't handle properly in LinkedIn query context
|
|
45
|
+
const encodedKw = kw
|
|
46
|
+
.replace(/\(/g, '%28') // Encode (
|
|
47
|
+
.replace(/\)/g, '%29') // Encode )
|
|
48
|
+
.replace(/\[/g, '%5B') // Encode [
|
|
49
|
+
.replace(/\]/g, '%5D') // Encode ]
|
|
50
|
+
.replace(/\{/g, '%7B') // Encode {
|
|
51
|
+
.replace(/\}/g, '%7D') // Encode }
|
|
52
|
+
.replace(/&/g, '%26') // Encode &
|
|
53
|
+
.replace(/\+/g, '%2B') // Encode +
|
|
54
|
+
.replace(/=/g, '%3D') // Encode =
|
|
55
|
+
.replace(/\s+/g, '%20'); // Encode spaces
|
|
45
56
|
const f = [];
|
|
46
57
|
// SENIORITY_LEVEL
|
|
47
58
|
if (filters?.role?.seniority_ids?.length) {
|