@jobloo/shared 1.0.7 → 1.0.8

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.
@@ -22,7 +22,7 @@ export declare function getBestDescription(job: {
22
22
  }): string;
23
23
  /**
24
24
  * Get raw HTML description for rich rendering
25
- * Only decodes HTML entities but preserves structure tags
25
+ * Decodes HTML entities so &lt;p&gt; becomes <p> for proper rendering
26
26
  */
27
27
  export declare function getRawDescription(job: {
28
28
  source?: string;
@@ -137,18 +137,25 @@ export function getBestDescription(job) {
137
137
  }
138
138
  /**
139
139
  * Get raw HTML description for rich rendering
140
- * Only decodes HTML entities but preserves structure tags
140
+ * Decodes HTML entities so &lt;p&gt; becomes <p> for proper rendering
141
141
  */
142
142
  export function getRawDescription(job) {
143
+ let rawHtml = '';
143
144
  // For LEVER: Combine opening + description_body
144
145
  if (job.source === 'lever') {
145
146
  const opening = job.opening || '';
146
147
  const body = job.descriptionBody || '';
147
148
  if (opening && body) {
148
- return opening + '<br/><br/>' + body;
149
+ rawHtml = opening + '<br/><br/>' + body;
149
150
  }
150
- return body || opening || '';
151
+ else {
152
+ rawHtml = body || opening || '';
153
+ }
154
+ }
155
+ else {
156
+ // For other sources: Use description field
157
+ rawHtml = job.description || job.descriptionBody || job.opening || '';
151
158
  }
152
- // For other sources: Use description field
153
- return job.description || job.descriptionBody || job.opening || '';
159
+ // Decode HTML entities so &lt;p&gt; becomes <p> for rendering
160
+ return decodeHTMLEntities(rawHtml);
154
161
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobloo/shared",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Shared types and utilities for Jobloo",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",