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.
@@ -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
- const encodedKw = kw.replace(/\s+/g, '%20');
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkedin-secret-sauce",
3
- "version": "0.3.28",
3
+ "version": "0.3.29",
4
4
  "description": "Private LinkedIn Sales Navigator client with automatic cookie management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",